diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-11-03 16:47:15 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-11-10 19:41:03 +0300 |
commit | d1f0b2f4339a7a46679ceb361982448229013c13 (patch) | |
tree | 2ffc7d46fce0e70e3fc50098ff32f43de5fd2154 /spec/features/projects/new_project_spec.rb | |
parent | e4c05de75ccec1b0d64a7a994f05d54bffc903e5 (diff) |
Fix project Visibility level selector not using default values
Diffstat (limited to 'spec/features/projects/new_project_spec.rb')
-rw-r--r-- | spec/features/projects/new_project_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb new file mode 100644 index 00000000000..abfc46601fb --- /dev/null +++ b/spec/features/projects/new_project_spec.rb @@ -0,0 +1,19 @@ +require "spec_helper" + +feature "New project", feature: true do + context "Visibility level selector" do + let(:user) { create(:admin) } + + before { login_as(user) } + + Gitlab::VisibilityLevel.options.each do |key, level| + it "sets selector to #{key}" do + stub_application_setting(default_project_visibility: level) + + visit new_project_path + + expect(find_field("project_visibility_level_#{level}")).to be_checked + end + end + end +end |