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/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)