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
62c2cd2d
Commit
62c2cd2d
authored
Aug 23, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Tests
parent
5d51ab2a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
spec/controllers/groups/analytics_controller_spec.rb
spec/controllers/groups/analytics_controller_spec.rb
+12
-5
spec/ee/spec/views/layouts/nav/_group.html.haml_spec.rb
spec/ee/spec/views/layouts/nav/_group.html.haml_spec.rb
+11
-5
spec/features/projects/audit_events_spec.rb
spec/features/projects/audit_events_spec.rb
+2
-1
No files found.
spec/controllers/groups/analytics_controller_spec.rb
View file @
62c2cd2d
...
...
@@ -46,13 +46,20 @@ describe Groups::AnalyticsController do
expect
(
response
).
to
have_http_status
(
404
)
end
it
'returns page when feature is not available and we show promotions'
do
stub_licensed_features
(
contribution_analytics:
false
)
let!
(
:license
)
{
nil
}
context
'unlicensed but we show promotions'
do
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
stub_application_setting
(
check_namespace_plan:
false
)
end
get
:show
,
group_id:
group
.
path
it
'returns page when feature is not available and we show promotions'
do
stub_licensed_features
(
contribution_analytics:
false
)
let!
(
:license
)
{
nil
}
expect
(
response
).
to
have_http_status
(
200
)
get
:show
,
group_id:
group
.
path
expect
(
response
).
to
have_http_status
(
200
)
end
end
it
'sets instance variables properly'
do
...
...
spec/ee/spec/views/layouts/nav/_group.html.haml_spec.rb
View file @
62c2cd2d
...
...
@@ -14,13 +14,19 @@ describe 'layouts/nav/_group' do
expect
(
rendered
).
not_to
have_text
'Contribution Analytics'
end
it
'is visible when there is no valid license but we show promotions'
do
stub_licensed_features
(
contribution_analytics:
false
)
let!
(
:license
)
{
nil
}
context
'no license installed'
do
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
stub_application_setting
(
check_namespace_plan:
false
)
end
render
it
'is visible when there is no valid license but we show promotions'
do
stub_licensed_features
(
contribution_analytics:
false
)
expect
(
rendered
).
to
have_text
'Contribution Analytics'
render
expect
(
rendered
).
to
have_text
'Contribution Analytics'
end
end
it
'is visible'
do
...
...
spec/features/projects/audit_events_spec.rb
View file @
62c2cd2d
...
...
@@ -31,7 +31,8 @@ feature 'Projects > Audit Events', :js do
context
'unlicensed but we show promotions'
do
before
do
stub_licensed_features
(
audit_events:
false
)
let!
(
:license
)
{
nil
}
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
stub_application_setting
(
check_namespace_plan:
false
)
end
it
'returns 404'
do
...
...
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