Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
SpacePoints
Commits
dbef0f9a
Commit
dbef0f9a
authored
Feb 25, 2014
by
surma Lodur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix für Quest#sole soll quest Beziehung im Earning aufbauen
parent
72b08768
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/quest.rb
app/models/quest.rb
+1
-0
spec/models/quest_spec.rb
spec/models/quest_spec.rb
+2
-1
No files found.
app/models/quest.rb
View file @
dbef0f9a
...
...
@@ -12,6 +12,7 @@ class Quest < ActiveRecord::Base
hacker
.
earnings
.
create
({
:user
=>
user
,
:points
=>
self
.
points
,
:quest
=>
self
,
:chronicle_text
=>
self
.
title
})
end
# #solve
...
...
spec/models/quest_spec.rb
View file @
dbef0f9a
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment