Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
752eb2c1
Commit
752eb2c1
authored
Jan 15, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more tests fixed
parent
b059de2a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
spec/lib/votes_spec.rb
spec/lib/votes_spec.rb
+0
-6
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+3
-2
spec/observers/note_observer_spec.rb
spec/observers/note_observer_spec.rb
+2
-1
No files found.
spec/lib/votes_spec.rb
View file @
752eb2c1
require
'spec_helper'
describe
Issue
do
it
{
should
include_module
(
Votes
)
}
end
describe
MergeRequest
do
let
(
:merge_request
)
{
FactoryGirl
.
create
(
:merge_request_with_diffs
)
}
it
{
should
include_module
(
Votes
)
}
describe
"#upvotes"
do
it
"with no notes has a 0/0 score"
do
merge_request
.
upvotes
.
should
==
0
...
...
spec/mailers/notify_spec.rb
View file @
752eb2c1
...
...
@@ -233,9 +233,10 @@ describe Notify do
commit
.
stub
(
:safe_message
).
and_return
(
'some message'
)
end
end
before
(
:each
)
{
note
.
stub
(
:noteable
).
and_return
(
commit
)
}
subject
{
Notify
.
note_commit_email
(
recipient
.
id
,
note
.
id
)
}
subject
{
Notify
.
note_commit_email
(
recipient
.
email
,
note
.
id
)
}
it_behaves_like
'a note email'
...
...
spec/observers/note_observer_spec.rb
View file @
752eb2c1
...
...
@@ -41,8 +41,9 @@ describe NoteObserver do
it
'notifies the author of a commit when flagged to notify the author'
do
note
.
stub
(
:notify_author
).
and_return
(
true
)
note
.
stub
(
:noteable
).
and_return
(
double
(
author_email:
'test@test.com'
))
note
.
stub
(
:id
).
and_return
(
42
)
author
=
double
:user
,
id:
1
author
=
double
:user
,
id:
1
,
email:
'test@test.com'
note
.
stub
(
:commit_author
).
and_return
(
author
)
Notify
.
should_receive
(
:note_commit_email
)
...
...
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