diff options
author | Robert Speicher <robert@gitlab.com> | 2016-11-14 13:05:30 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-11-14 13:05:30 +0300 |
commit | 352d880a508ec0eec1acba0d0319dc858017ff9b (patch) | |
tree | 2b75a7dc28cc974355d033cf663cc027e7a9617d /spec | |
parent | 006c163b53d062d990ac213deac70978b0a927cc (diff) | |
parent | d1f0b2f4339a7a46679ceb361982448229013c13 (diff) |
Merge branch 'issue_20245' into 'master'
Fix project Visibility level selector not using default values
closes #20245
See merge request !7264
Diffstat (limited to 'spec')
-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 |