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
7f43dd74
Commit
7f43dd74
authored
Jun 08, 2018
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix misspelling of method `.present?`
parent
ebfb68be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
ee/app/views/admin/_namespace_plan_badge.html.haml
ee/app/views/admin/_namespace_plan_badge.html.haml
+1
-1
ee/spec/views/admin/users/index.html.haml_spec.rb
ee/spec/views/admin/users/index.html.haml_spec.rb
+16
-1
No files found.
ee/app/views/admin/_namespace_plan_badge.html.haml
View file @
7f43dd74
-
namespace
=
local_assigns
.
fetch
(
:namespace
)
-
return
unless
Gitlab
::
CurrentSettings
.
should_check_namespace_plan?
&&
namespace
.
plan
.
present
-
return
unless
Gitlab
::
CurrentSettings
.
should_check_namespace_plan?
&&
namespace
.
plan
.
present
?
%span
.plan-badge.has-tooltip
{
data:
{
plan:
namespace
.
plan
.
name
},
title:
"#{namespace.plan.title} Plan"
}
=
custom_icon
(
'icon_premium'
)
ee/spec/views/admin/users/index.html.haml_spec.rb
View file @
7f43dd74
require
'rails_helper'
describe
'admin/users/index'
do
it
'includes "Send email to users" link'
do
let
(
:should_check_namespace_plan
)
{
false
}
before
do
allow
(
Gitlab
::
CurrentSettings
).
to
receive
(
:should_check_namespace_plan?
)
.
and_return
(
should_check_namespace_plan
)
allow
(
view
).
to
receive
(
:container_class
).
and_return
(
'ignored'
)
create
(
:user
)
# to have at least one usser
assign
(
:users
,
User
.
all
.
page
(
1
))
render
end
it
'includes "Send email to users" link'
do
expect
(
rendered
).
to
have_link
'Send email to users'
,
href:
admin_email_path
end
context
'when Gitlab::CurrentSettings.should_check_namespace_plan is true'
do
let
(
:should_check_namespace_plan
)
{
true
}
it
'includes "Send email to users" link'
do
expect
(
rendered
).
to
have_link
'Send email to users'
,
href:
admin_email_path
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