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
40f62bae
Commit
40f62bae
authored
Feb 26, 2018
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for GithubService license uses silver/premium
parent
d2bd7606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+6
-2
spec/support/services_shared_context.rb
spec/support/services_shared_context.rb
+8
-0
No files found.
ee/spec/models/project_spec.rb
View file @
40f62bae
...
...
@@ -1084,7 +1084,7 @@ describe Project do
describe
'#disabled_services'
do
let
(
:namespace
)
{
create
(
:group
,
:private
)
}
let
(
:project
)
{
create
(
:project
,
:private
,
namespace:
namespace
)
}
let
(
:disabled_services
)
{
%w(jenkins jenkins_deprecated)
}
let
(
:disabled_services
)
{
%w(jenkins jenkins_deprecated
github
)
}
context
'without a license key'
do
before
do
...
...
@@ -1095,6 +1095,10 @@ describe Project do
end
context
'with a license key'
do
before
do
allow_any_instance_of
(
License
).
to
receive
(
:plan
).
and_return
(
License
::
PREMIUM_PLAN
)
end
context
'when checking of namespace plan is enabled'
do
before
do
stub_application_setting_on_object
(
project
,
should_check_namespace_plan:
true
)
...
...
@@ -1105,7 +1109,7 @@ describe Project do
end
context
'and namespace has a plan'
do
let
(
:namespace
)
{
create
(
:group
,
:private
,
plan: :
bronze
_plan
)
}
let
(
:namespace
)
{
create
(
:group
,
:private
,
plan: :
silver
_plan
)
}
it_behaves_like
'project without disabled services'
end
...
...
spec/support/services_shared_context.rb
View file @
40f62bae
...
...
@@ -26,6 +26,14 @@ Service.available_services_names.each do |service|
end
end
before
do
if
service
==
'github'
stub_licensed_features
(
github_project_service_integration:
true
)
project
.
clear_memoization
(
:disabled_services
)
project
.
clear_memoization
(
:licensed_feature_available
)
end
end
def
initialize_service
(
service
)
service_item
=
project
.
find_or_initialize_service
(
service
)
service_item
.
properties
=
service_attrs
...
...
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