aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/chouette/timeband_spec.rb
blob: 1f812a6e20430237471f2cfa0f42c9d637815dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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