diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 46285957d..22e4cf477 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -13,7 +13,7 @@ GEM execjs coffee-script-source (1.11.1) colorator (1.1.0) - commonmarker (0.23.9) + commonmarker (0.23.10) concurrent-ruby (1.2.2) dnsruby (1.61.9) simpleidn (~> 0.1) diff --git a/spec/helpers/filters_helper_spec.rb b/spec/helpers/filters_helper_spec.rb index da36068b1..f60cc483e 100644 --- a/spec/helpers/filters_helper_spec.rb +++ b/spec/helpers/filters_helper_spec.rb @@ -176,7 +176,7 @@ RSpec.describe FiltersHelper do let(:user) { FactoryBot.create(:user, :support, organisation: child_organisation) } it "returns a list of all organisations" do - expect(owning_organisation_filter_options(user)).to eq([ + expect(owning_organisation_filter_options(user)).to match_array([ OpenStruct.new(id: "", name: "Select an option"), OpenStruct.new(id: child_organisation.id, name: "Child organisation"), OpenStruct.new(id: absorbed_organisation.id, name: "Absorbed organisation"), diff --git a/spec/services/csv/lettings_log_csv_service_spec.rb b/spec/services/csv/lettings_log_csv_service_spec.rb index f21ebfe4e..5236f1206 100644 --- a/spec/services/csv/lettings_log_csv_service_spec.rb +++ b/spec/services/csv/lettings_log_csv_service_spec.rb @@ -28,6 +28,15 @@ RSpec.describe Csv::LettingsLogCsvService do let(:logs) { [log] } let(:headers) { csv.first } + before do + Timecop.freeze(fixed_time) + Singleton.__init__(FormHandler) + end + + after do + Timecop.return + end + it "calls the form handler to get all questions in order when initialized" do allow(FormHandler).to receive(:instance).and_return(form_handler_mock) allow(form_handler_mock).to receive(:ordered_lettings_questions_for_all_years).and_return([])