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,25 +28,29 @@ describe 'layouts/header/_new_dropdown' do
group.add_owner(user)
end
it 'does not have "New epic" link' do
context 'with the epics license' do
before do
stub_licensed_features(epics: true)
end
it 'has a "New epic" link' do
render
expect(rendered).not_to have_link(
expect(rendered).to have_link(
'New epic',
href: new_group_epic_path(group)
)
end
context 'when epics are enabled' do
context 'with the create_epic_form feature flag disabled' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(create_epic_form: true)
stub_feature_flags(create_epic_form: false)
end
it 'has a "New epic" link' do
it 'does not have "New epic" link' do
render
expect(rendered).to have_link(
expect(rendered).not_to have_link(
'New epic',
href: new_group_epic_path(group)
)
......@@ -54,4 +58,5 @@ describe 'layouts/header/_new_dropdown' do
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