Fix the test failures

This commit is contained in:
Sasi Olin 2022-03-30 12:39:01 +02:00
parent 50e876dd6f
commit e85ecede4c
29 changed files with 232 additions and 232 deletions

View file

@ -5,22 +5,22 @@ require 'spec_helper'
context 'Delegation' do
subject do
FactoryBot.create(:conference, start_date: 1.month.from_now, end_date: 2.month.from_now)
create(:conference, start_date: 1.month.from_now, end_date: 2.month.from_now)
end
context 'Venue' do
context 'when venue has not been set' do
it 'the accessors should be nil' do
expect(subject.city).to eq(nil)
expect(subject.country_name).to eq(nil)
expect(subject.venue_name).to eq(nil)
expect(subject.venue_street).to eq(nil)
expect(subject.city).to be_nil
expect(subject.country_name).to be_nil
expect(subject.venue_name).to be_nil
expect(subject.venue_street).to be_nil
end
end
context 'when venue has been set' do
it 'should delegate to venue' do
venue = FactoryBot.create(:venue)
venue = create(:venue)
subject.update(venue: venue)
expect(subject.city).to eq(venue.city)
expect(subject.country_name).to eq(venue.country_name)
@ -33,7 +33,7 @@ end
describe Conference do
let(:subject) { create(:conference, start_date: Date.new(2014, 06, 30), end_date: Date.new(2014, 06, 30)) }
subject(:test_subject) { create(:conference, start_date: Date.new(2014, 06, 30), end_date: Date.new(2014, 06, 30)) }
describe '#write_event_distribution_to_db' do
@ -744,7 +744,7 @@ describe Conference do
end
describe '#get_submission_line_colors' do
it ' returns correct values' do
it 'returns correct values' do
result = []
result.push(short_title: 'Submitted', color: 'blue')
result.push(short_title: 'Confirmed', color: 'green')