Skip to content
Snippets Groups Projects
Unverified Commit 742def09 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix failing rspecs (#5519)

parent cc0b7300
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ class HealthChecksController < ApplicationController
def check_database
raise 'Unable to connect to Database' unless ActiveRecord::Base.connection.active?
raise 'Unable to connect to Database - pending migrations' unless ActiveRecord::Migration.check_pending!.nil?
raise 'Unable to connect to Database - pending migrations' unless ActiveRecord::Migration.check_all_pending!.nil?
rescue StandardError => e
raise "Unable to connect to Database - #{e}"
end
......
......@@ -48,7 +48,7 @@ RSpec.describe SiteSetting, type: :model do
it 'fails if the attachement is too large' do
site_setting = build(:site_setting, image: fixture_file_upload(file_fixture('large-avatar.jpg'), 'image/jpeg'))
expect(site_setting).to be_invalid
expect(site_setting.errors).to be_of_kind(:image, :file_size_out_of_range)
expect(site_setting.errors).to be_of_kind(:image, :file_size_not_less_than)
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment