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
f6fba5f7
Commit
f6fba5f7
authored
Oct 16, 2020
by
Jason Goodman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve spec performance for feature flag services
Refactor to use let_it_be
parent
1bff8ba9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
spec/services/feature_flags/create_service_spec.rb
spec/services/feature_flags/create_service_spec.rb
+4
-4
spec/services/feature_flags/destroy_service_spec.rb
spec/services/feature_flags/destroy_service_spec.rb
+4
-4
spec/services/feature_flags/disable_service_spec.rb
spec/services/feature_flags/disable_service_spec.rb
+3
-3
spec/services/feature_flags/enable_service_spec.rb
spec/services/feature_flags/enable_service_spec.rb
+3
-3
spec/services/feature_flags/update_service_spec.rb
spec/services/feature_flags/update_service_spec.rb
+4
-4
No files found.
spec/services/feature_flags/create_service_spec.rb
View file @
f6fba5f7
...
...
@@ -3,12 +3,12 @@
require
'spec_helper'
RSpec
.
describe
FeatureFlags
::
CreateService
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:reporter
)
{
create
(
:user
)
}
let
_it_be
(
:project
)
{
create
(
:project
)
}
let
_it_be
(
:developer
)
{
create
(
:user
)
}
let
_it_be
(
:reporter
)
{
create
(
:user
)
}
let
(
:user
)
{
developer
}
before
do
before
_all
do
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
end
...
...
spec/services/feature_flags/destroy_service_spec.rb
View file @
f6fba5f7
...
...
@@ -5,13 +5,13 @@ require 'spec_helper'
RSpec
.
describe
FeatureFlags
::
DestroyService
do
include
FeatureFlagHelpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:reporter
)
{
create
(
:user
)
}
let
_it_be
(
:project
)
{
create
(
:project
)
}
let
_it_be
(
:developer
)
{
create
(
:user
)
}
let
_it_be
(
:reporter
)
{
create
(
:user
)
}
let
(
:user
)
{
developer
}
let!
(
:feature_flag
)
{
create
(
:operations_feature_flag
,
project:
project
)
}
before
do
before
_all
do
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
end
...
...
spec/services/feature_flags/disable_service_spec.rb
View file @
f6fba5f7
...
...
@@ -5,12 +5,12 @@ require 'spec_helper'
RSpec
.
describe
FeatureFlags
::
DisableService
do
include
FeatureFlagHelpers
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:params
)
{
{}
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
before
do
before
_all
do
project
.
add_developer
(
user
)
end
...
...
spec/services/feature_flags/enable_service_spec.rb
View file @
f6fba5f7
...
...
@@ -5,12 +5,12 @@ require 'spec_helper'
RSpec
.
describe
FeatureFlags
::
EnableService
do
include
FeatureFlagHelpers
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
let
(
:params
)
{
{}
}
let
(
:service
)
{
described_class
.
new
(
project
,
user
,
params
)
}
before
do
before
_all
do
project
.
add_developer
(
user
)
end
...
...
spec/services/feature_flags/update_service_spec.rb
View file @
f6fba5f7
...
...
@@ -3,13 +3,13 @@
require
'spec_helper'
RSpec
.
describe
FeatureFlags
::
UpdateService
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:reporter
)
{
create
(
:user
)
}
let
_it_be
(
:project
)
{
create
(
:project
)
}
let
_it_be
(
:developer
)
{
create
(
:user
)
}
let
_it_be
(
:reporter
)
{
create
(
:user
)
}
let
(
:user
)
{
developer
}
let
(
:feature_flag
)
{
create
(
:operations_feature_flag
,
project:
project
,
active:
true
)
}
before
do
before
_all
do
project
.
add_developer
(
developer
)
project
.
add_reporter
(
reporter
)
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