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
bdd752c9
Commit
bdd752c9
authored
Jul 20, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant contexts in specs
parent
c996970b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
70 deletions
+60
-70
ee/spec/helpers/ee/trial_helper_spec.rb
ee/spec/helpers/ee/trial_helper_spec.rb
+22
-28
ee/spec/models/ee/namespace_spec.rb
ee/spec/models/ee/namespace_spec.rb
+38
-42
No files found.
ee/spec/helpers/ee/trial_helper_spec.rb
View file @
bdd752c9
...
...
@@ -197,7 +197,6 @@ RSpec.describe EE::TrialHelper do
it
{
is_expected
.
to
be_falsey
}
end
context
'when feature flag is enabled'
do
where
(
:can_extend_trial
,
:can_reactivate_trial
,
:result
)
do
false
|
false
|
false
true
|
false
|
true
...
...
@@ -207,8 +206,6 @@ RSpec.describe EE::TrialHelper do
with_them
do
before
do
stub_feature_flags
(
allow_extend_reactivate_trial:
true
)
allow
(
namespace
).
to
receive
(
:can_extend_trial?
).
and_return
(
can_extend_trial
)
allow
(
namespace
).
to
receive
(
:can_reactivate_trial?
).
and_return
(
can_reactivate_trial
)
end
...
...
@@ -216,7 +213,6 @@ RSpec.describe EE::TrialHelper do
it
{
is_expected
.
to
eq
(
result
)
}
end
end
end
describe
'#extend_reactivate_trial_button_data'
do
let
(
:namespace
)
{
build
(
:namespace
,
id:
1
)
}
...
...
@@ -253,7 +249,6 @@ RSpec.describe EE::TrialHelper do
end
end
context
'when feature flag is enabled'
do
context
'when trial can be extended'
do
before
do
allow
(
namespace
).
to
receive
(
:can_extend_trial?
).
and_return
(
true
)
...
...
@@ -270,5 +265,4 @@ RSpec.describe EE::TrialHelper do
it
{
is_expected
.
to
eq
({
namespace_id:
1
,
plan_name:
'Ultimate'
,
action:
'reactivate'
})
}
end
end
end
end
ee/spec/models/ee/namespace_spec.rb
View file @
bdd752c9
...
...
@@ -1261,7 +1261,6 @@ RSpec.describe Namespace do
it
{
is_expected
.
to
be_falsey
}
end
context
'when feature flag is enabled'
do
where
(
:trial_active
,
:trial_extended_or_reactivated
,
:can_extend_trial
)
do
false
|
false
|
false
false
|
true
|
false
...
...
@@ -1278,7 +1277,6 @@ RSpec.describe Namespace do
it
{
is_expected
.
to
be
can_extend_trial
}
end
end
end
describe
'#can_reactivate_trial?'
do
subject
{
namespace
.
can_reactivate_trial?
}
...
...
@@ -1296,7 +1294,6 @@ RSpec.describe Namespace do
it
{
is_expected
.
to
be_falsey
}
end
context
'when feature flag is enabled'
do
where
(
:trial_active
,
:never_had_trial
,
:trial_extended_or_reactivated
,
:free_plan
,
:can_reactivate_trial
)
do
false
|
false
|
false
|
false
|
false
false
|
false
|
false
|
true
|
true
...
...
@@ -1327,7 +1324,6 @@ RSpec.describe Namespace do
it
{
is_expected
.
to
be
can_reactivate_trial
}
end
end
end
describe
'#file_template_project_id'
do
it
'is cleared before validation'
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