Sha256: d972a0d021f99bea54eeed63e1729e75c00a0234924344210bb736fe5cbdbbd1

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 Bytes

Contents

require 'spec_helper'

describe Chouette::Network, :type => :model do

  subject { create(:network) }

  it { is_expected.to validate_presence_of :registration_number }
  it { is_expected.to validate_uniqueness_of :registration_number }

  it { is_expected.to validate_presence_of :name }

  # it { should validate_presence_of :objectid }
  it { is_expected.to validate_uniqueness_of :objectid }

  describe "#stop_areas" do
    let!(:line){create(:line, :network => subject)}
    let!(:route){create(:route, :line => line)}
    it "should retreive route's stop_areas" do
      expect(subject.stop_areas.count).to eq(route.stop_points.count)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ninoxe-1.2.0 spec/models/chouette/network_spec.rb