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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
396e484a
Commit
396e484a
authored
Oct 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5385 from tsigo/notification-helper-spec
Add specs for NotificationsHelper
parents
4a5a130a
ae4a2013
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
spec/helpers/notifications_helper_spec.rb
spec/helpers/notifications_helper_spec.rb
+31
-11
No files found.
spec/helpers/notifications_helper_spec.rb
View file @
396e484a
require
'spec_helper'
# Specs in this file have access to a helper object that includes
# the NotificationsHelper. For example:
#
# describe NotificationsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe
NotificationsHelper
do
pending
"add some examples to (or delete)
#{
__FILE__
}
"
describe
'notification_icon'
do
let
(
:notification
)
{
stub
(
disabled?:
false
,
participating?:
false
,
watch?:
false
)
}
context
"disabled notification"
do
before
{
notification
.
stub
(
disabled?:
true
)
}
it
"has a red icon"
do
notification_icon
(
notification
).
should
match
(
'class="icon-circle cred"'
)
end
end
context
"participating notification"
do
before
{
notification
.
stub
(
participating?:
true
)
}
it
"has a blue icon"
do
notification_icon
(
notification
).
should
match
(
'class="icon-circle cblue"'
)
end
end
context
"watched notification"
do
before
{
notification
.
stub
(
watch?:
true
)
}
it
"has a green icon"
do
notification_icon
(
notification
).
should
match
(
'class="icon-circle cgreen"'
)
end
end
it
"has a blue icon"
do
notification_icon
(
notification
).
should
match
(
'class="icon-circle-blank cblue"'
)
end
end
end
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