diff options
Diffstat (limited to 'spec/models/chouette/timeband_spec.rb')
| -rw-r--r-- | spec/models/chouette/timeband_spec.rb | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/spec/models/chouette/timeband_spec.rb b/spec/models/chouette/timeband_spec.rb new file mode 100644 index 000000000..1f812a6e2 --- /dev/null +++ b/spec/models/chouette/timeband_spec.rb @@ -0,0 +1,18 @@ +require 'spec_helper' + +describe Chouette::Timeband, :type => :model do + +  describe '#create' do +    context 'when valid' do +      it { create(:timeband) } +    end + +    context 'when not valid' do +      it 'fails validation with end_time before start_time' do +        timeband = build(:timeband_invalid) +        expect(timeband).to be_invalid +      end +    end +  end + +end | 
