Refactor specs

This commit is contained in:
blackst0ne 2017-03-12 00:59:09 +11:00
parent 93e204ea52
commit 6625d605ec

View file

@ -16,6 +16,15 @@ feature "New project", feature: true do
expect(find_field("project_visibility_level_#{level}")).to be_checked expect(find_field("project_visibility_level_#{level}")).to be_checked
end end
it 'saves visibility level on validation error' do
visit new_project_path
choose(key)
click_button('Create project')
expect(find_field("project_visibility_level_#{level}")).to be_checked
end
end end
end end
@ -60,12 +69,6 @@ feature "New project", feature: true do
expect(namespace.text).to eq group.name expect(namespace.text).to eq group.name
end end
it 'selects the visibility level' do
level = Gitlab::VisibilityLevel.options['Internal']
expect(find_field("project_visibility_level_#{level}")).to be_checked
end
end end
end end
end end