Commit dbef0f9a authored by surma Lodur's avatar surma Lodur

fix für Quest#sole soll quest Beziehung im Earning aufbauen

parent 72b08768
......@@ -12,6 +12,7 @@ class Quest < ActiveRecord::Base
hacker.earnings.create({
:user => user,
:points => self.points,
:quest => self,
:chronicle_text => self.title
})
end # #solve
......
......@@ -14,9 +14,10 @@ describe Quest do
describe '#solve' do
it 'should produce a reward' do
hacker.reload.should have(0).earnings
hacker.should have(0).earnings
subject.solve(hacker)
hacker.reload.should have(1).earnings
hacker.earnings.first.quest.should be_eql(subject)
end
it 'should produce text into reward'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment