aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/chouette/footnote_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/chouette/footnote_spec.rb')
-rw-r--r--spec/models/chouette/footnote_spec.rb12
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