summaryrefslogtreecommitdiff
path: root/spec/models/appearance_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/models/appearance_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/models/appearance_spec.rb')
-rw-r--r--spec/models/appearance_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/appearance_spec.rb b/spec/models/appearance_spec.rb
index 37eddf9a22a..2817e177d28 100644
--- a/spec/models/appearance_spec.rb
+++ b/spec/models/appearance_spec.rb
@@ -15,7 +15,7 @@ RSpec.describe Appearance do
create(:appearance)
new_row = build(:appearance)
- new_row.save
+ expect { new_row.save! }.to raise_error(ActiveRecord::RecordInvalid, 'Validation failed: Only 1 appearances row can exist')
expect(new_row.valid?).to eq(false)
end
@@ -39,7 +39,7 @@ RSpec.describe Appearance do
end
it 'returns the path when the upload has been orphaned' do
- appearance.send(logo_type).upload.destroy
+ appearance.send(logo_type).upload.destroy!
appearance.reload
expect(appearance.send("#{logo_type}_path")).to eq(expected_path)