Commit 0b0f59c5 authored by Jason Goodman's avatar Jason Goodman

Improve feature_flags_controller_spec performance

Use let_it_be in initial setup
parent 997e6bd8
...@@ -7,15 +7,17 @@ describe Projects::FeatureFlagsController do ...@@ -7,15 +7,17 @@ describe Projects::FeatureFlagsController do
include FeatureFlagHelpers include FeatureFlagHelpers
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user) }
let_it_be(:reporter) { create(:user) }
let(:user) { developer } let(:user) { developer }
let(:developer) { create(:user) }
let(:reporter) { create(:user) }
let(:feature_enabled) { true } let(:feature_enabled) { true }
before do before_all do
project.add_developer(developer) project.add_developer(developer)
project.add_reporter(reporter) project.add_reporter(reporter)
end
before do
sign_in(user) sign_in(user)
stub_licensed_features(feature_flags: feature_enabled) stub_licensed_features(feature_flags: feature_enabled)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment