diff options
| author | Luc Donnet | 2018-02-19 11:04:29 +0100 |
|---|---|---|
| committer | Luc Donnet | 2018-02-19 11:04:29 +0100 |
| commit | 7b17deff51545358009cb417cbb9d796565e7540 (patch) | |
| tree | a43a5586ad39d838dd607e600dbc15ff18a58ab3 /spec/models/chouette/footnote_spec.rb | |
| parent | 89428163fc93a7e09ebb0ca47939f8558afeb5eb (diff) | |
| parent | 5f6008d165df4499319a2121a71842657d6ac3c9 (diff) | |
| download | chouette-core-7b17deff51545358009cb417cbb9d796565e7540.tar.bz2 | |
Merge branch 'master' into 0000-docker
Diffstat (limited to 'spec/models/chouette/footnote_spec.rb')
| -rw-r--r-- | spec/models/chouette/footnote_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/chouette/footnote_spec.rb b/spec/models/chouette/footnote_spec.rb index fc5e5f306..05f55c2f0 100644 --- a/spec/models/chouette/footnote_spec.rb +++ b/spec/models/chouette/footnote_spec.rb @@ -1,12 +1,12 @@ require 'spec_helper' describe Chouette::Footnote, type: :model do - let(:footnote) { create(:footnote) } + subject { create(:footnote) } it { should validate_presence_of :line } describe 'data_source_ref' do it 'should set default if omitted' do - expect(footnote.data_source_ref).to eq "DATASOURCEREF_EDITION_BOIV" + expect(subject.data_source_ref).to eq "DATASOURCEREF_EDITION_BOIV" end it 'should not set default if not omitted' do @@ -18,16 +18,16 @@ describe Chouette::Footnote, type: :model do end describe 'checksum' do - it_behaves_like 'checksum support', :footnote + it_behaves_like 'checksum support' context '#checksum_attributes' do it 'should return code and label' do - expected = [footnote.code, footnote.label] - expect(footnote.checksum_attributes).to include(*expected) + expected = [subject.code, subject.label] + expect(subject.checksum_attributes).to include(*expected) end it 'should not return other atrributes' do - expect(footnote.checksum_attributes).to_not include(footnote.updated_at) + expect(subject.checksum_attributes).to_not include(subject.updated_at) end end end |
