Commit 1ec3fe93 authored by Axel García's avatar Axel García

Invert logic on "New" dropdown tests

Feature flags are enabled by default in tests, so some test were not
testing something meaningful.
parent 391e0f36
......@@ -28,19 +28,9 @@ describe 'layouts/header/_new_dropdown' do
group.add_owner(user)
end
it 'does not have "New epic" link' do
render
expect(rendered).not_to have_link(
'New epic',
href: new_group_epic_path(group)
)
end
context 'when epics are enabled' do
context 'with the epics license' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(create_epic_form: true)
end
it 'has a "New epic" link' do
......@@ -51,6 +41,21 @@ describe 'layouts/header/_new_dropdown' do
href: new_group_epic_path(group)
)
end
context 'with the create_epic_form feature flag disabled' do
before do
stub_feature_flags(create_epic_form: false)
end
it 'does not have "New epic" link' do
render
expect(rendered).not_to have_link(
'New epic',
href: new_group_epic_path(group)
)
end
end
end
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