Commit 8e0d8bde authored by Shinya Maeda's avatar Shinya Maeda

Apply 6 suggestion(s) to 3 file(s)

parent f3658bdb
...@@ -83,7 +83,7 @@ RSpec.describe Projects::IssueFeatureFlagsController do ...@@ -83,7 +83,7 @@ RSpec.describe Projects::IssueFeatureFlagsController do
stub_licensed_features(feature_flags_related_issues: false) stub_licensed_features(feature_flags_related_issues: false)
end end
it 'does not return linked issues' do it 'returns not found' do
feature_flag, _, _ = setup feature_flag, _, _ = setup
sign_in(developer) sign_in(developer)
......
...@@ -21,7 +21,7 @@ RSpec.describe IssueFeatureFlags::ListService do ...@@ -21,7 +21,7 @@ RSpec.describe IssueFeatureFlags::ListService do
create(:feature_flag_issue, feature_flag: feature_flag, issue: issue) create(:feature_flag_issue, feature_flag: feature_flag, issue: issue)
end end
context 'user can see feature flags' do context 'when user can see feature flags' do
before do before do
project.add_developer(user) project.add_developer(user)
end end
...@@ -32,7 +32,7 @@ RSpec.describe IssueFeatureFlags::ListService do ...@@ -32,7 +32,7 @@ RSpec.describe IssueFeatureFlags::ListService do
expect { described_class.new(issue, user).execute }.not_to exceed_query_limit(control_count) expect { described_class.new(issue, user).execute }.not_to exceed_query_limit(control_count)
end end
it 'returns related issues' do it 'returns related feature flags' do
expect(subject.size).to eq(4) expect(subject.size).to eq(4)
expect(subject).to include(include(id: feature_flag.id, expect(subject).to include(include(id: feature_flag.id,
...@@ -50,8 +50,8 @@ RSpec.describe IssueFeatureFlags::ListService do ...@@ -50,8 +50,8 @@ RSpec.describe IssueFeatureFlags::ListService do
end end
end end
context 'user can not see feature flags' do context 'when user can not see feature flags' do
it 'returns related issues' do it 'returns nothing' do
expect(subject.size).to eq(0) expect(subject.size).to eq(0)
end end
end end
......
...@@ -362,7 +362,7 @@ RSpec.describe Ability do ...@@ -362,7 +362,7 @@ RSpec.describe Ability do
cross_project.add_developer(user) cross_project.add_developer(user)
end end
it 'returns projects visible to the user' do it 'returns feature flags visible to the user' do
expect(readable_feature_flags).to contain_exactly(feature_flag, cross_project_feature_flag) expect(readable_feature_flags).to contain_exactly(feature_flag, cross_project_feature_flag)
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