aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/chouette
diff options
context:
space:
mode:
authorZog2018-05-28 15:25:04 +0200
committerZog2018-05-29 12:04:49 +0200
commit79e89af12bbc865b6defafa27dca5dafd72df3ef (patch)
tree4cd82388e99a7fb60cbae9a347f9afc3d8f208d7 /spec/models/chouette
parent898bdeeaa22193d00c2ccea84f3d2377ebeb8e4f (diff)
downloadchouette-core-79e89af12bbc865b6defafa27dca5dafd72df3ef.tar.bz2
Fix StopPoint#stop_area_light
Diffstat (limited to 'spec/models/chouette')
-rw-r--r--spec/models/chouette/vehicle_journey_at_stop_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/models/chouette/vehicle_journey_at_stop_spec.rb b/spec/models/chouette/vehicle_journey_at_stop_spec.rb
index ae9823243..05a772dac 100644
--- a/spec/models/chouette/vehicle_journey_at_stop_spec.rb
+++ b/spec/models/chouette/vehicle_journey_at_stop_spec.rb
@@ -1,10 +1,10 @@
require 'spec_helper'
RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
- subject { create(:vehicle_journey_at_stop) }
+ subject { build_stubbed(:vehicle_journey_at_stop) }
describe 'checksum' do
- let(:at_stop) { build_stubbed(:vehicle_journey_at_stop) }
+ subject(:at_stop) { create(:vehicle_journey_at_stop) }
it_behaves_like 'checksum support'
@@ -43,7 +43,7 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
end
context "the different times" do
- let (:at_stop) { build_stubbed(:vehicle_journey_at_stop) }
+ let (:at_stop) { create(:vehicle_journey_at_stop) }
describe "without a TimeZone" do
it "should not offset times" do
@@ -52,11 +52,10 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
end
end
-
describe "with a TimeZone" do
before(:each) do
stop = at_stop.stop_point.stop_area
- stop.time_zone = "Mexico City"
+ stop.update time_zone: "Mexico City"
end
it "should offset times" do
@@ -66,7 +65,7 @@ RSpec.describe Chouette::VehicleJourneyAtStop, type: :model do
context "with a wrong Timezone" do
before do
- at_stop.stop_point.stop_area.time_zone = "Gotham City"
+ at_stop.stop_point.stop_area.update time_zone: "Gotham City"
end
it "should not offset times" do