Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_setting_spec.rb')
-rw-r--r--spec/models/project_setting_spec.rb26
1 files changed, 1 insertions, 25 deletions
diff --git a/spec/models/project_setting_spec.rb b/spec/models/project_setting_spec.rb
index c020609c26f..4b2760d7699 100644
--- a/spec/models/project_setting_spec.rb
+++ b/spec/models/project_setting_spec.rb
@@ -77,36 +77,12 @@ RSpec.describe ProjectSetting, type: :model, feature_category: :groups_and_proje
expect(project_setting).not_to be_valid
expect(project_setting.errors.full_messages).to include("Pages unique domain has already been taken")
end
-
- it "validates if the pages_unique_domain already exist as a project path" do
- stub_pages_setting(host: 'example.com')
-
- create(:project, path: "random-unique-domain.example.com")
- project_setting = build(:project_setting, pages_unique_domain: "random-unique-domain")
-
- expect(project_setting).not_to be_valid
- expect(project_setting.errors.full_messages_for(:pages_unique_domain))
- .to match(["Pages unique domain already in use"])
- end
-
- context "when updating" do
- it "validates if the pages_unique_domain already exist as a project path" do
- stub_pages_setting(host: 'example.com')
- project_setting = create(:project_setting)
-
- create(:project, path: "random-unique-domain.example.com")
-
- expect(project_setting.update(pages_unique_domain: "random-unique-domain")).to eq(false)
- expect(project_setting.errors.full_messages_for(:pages_unique_domain))
- .to match(["Pages unique domain already in use"])
- end
- end
end
describe 'target_platforms=' do
it 'stringifies and sorts' do
project_setting = build(:project_setting, target_platforms: [:watchos, :ios])
- expect(project_setting.target_platforms).to eq %w[ios watchos]
+ expect(project_setting.target_platforms).to eq %w(ios watchos)
end
end