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
c900aa63
Commit
c900aa63
authored
Feb 15, 2017
by
Alfredo Sumaran
Committed by
Felipe Artur
Feb 17, 2017
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'fix-rubocop-master' into 'master'
Fix Rubocop offense See merge request !9274
parent
862141a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
spec/views/projects/_home_panel.html.haml_spec.rb
spec/views/projects/_home_panel.html.haml_spec.rb
+38
-0
No files found.
spec/views/projects/_home_panel.html.haml_spec.rb
0 → 100644
View file @
c900aa63
require
'spec_helper'
describe
'projects/_home_panel'
,
:view
do
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:notification_settings
)
do
user
&
.
notification_settings_for
(
project
)
end
before
do
assign
(
:project
,
project
)
assign
(
:notification_setting
,
notification_settings
)
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
false
)
end
context
'when user is signed in'
do
let
(
:user
)
{
create
(
:user
)
}
it
'makes it possible to set notification level'
do
render
expect
(
view
).
to
render_template
(
'shared/notifications/_button'
)
expect
(
rendered
).
to
have_selector
(
'.notification-dropdown'
)
end
end
context
'when user is signed out'
do
let
(
:user
)
{
nil
}
it
'is not possible to set notification level'
do
render
expect
(
rendered
).
not_to
have_selector
(
'.notification_dropdown'
)
end
end
end
Alain Takoudjou
@alain.takoudjou
mentioned in commit
51f82b3b
·
Aug 23, 2018
mentioned in commit
51f82b3b
mentioned in commit 51f82b3bb9779c8ba14216f185648e45738c269f
Toggle commit list
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