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
f89e1005
Commit
f89e1005
authored
Mar 16, 2020
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add view spec for `admin/users/_user.html.haml`
parent
70e6e625
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
spec/views/admin/users/_user.html.haml_spec.rb
spec/views/admin/users/_user.html.haml_spec.rb
+41
-0
No files found.
spec/views/admin/users/_user.html.haml_spec.rb
0 → 100644
View file @
f89e1005
# frozen_string_literal: true
require
'spec_helper'
describe
'admin/users/_user'
do
before
do
allow
(
view
).
to
receive
(
:user
).
and_return
(
user
)
end
describe
'internal users'
do
describe
'when showing a `Ghost User`'
do
let
(
:user
)
{
create
(
:user
,
ghost:
true
)
}
it
'does not render action buttons'
do
render
expect
(
rendered
).
not_to
have_selector
(
'.table-action-buttons'
)
end
end
describe
'when showing a `Bot User`'
do
let
(
:user
)
{
create
(
:user
,
bot_type: :alert_bot
)
}
it
'does not render action buttons'
do
render
expect
(
rendered
).
not_to
have_selector
(
'.table-action-buttons'
)
end
end
end
describe
'when showing an external user'
do
let
(
:user
)
{
create
(
:user
)
}
it
'renders action buttons'
do
render
expect
(
rendered
).
to
have_selector
(
'.table-action-buttons'
)
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