aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorTeddy Wing2017-07-20 12:21:35 +0200
committerTeddy Wing2017-07-20 12:21:35 +0200
commit9b3778f8d2afe93486ea8e49ec7730cb1ec2be1e (patch)
treef00016286e5af968c0b6efa3d7969cfa1dc8bdba /spec
parent42a51eef7d242583726c4942583b4ab567c4d293 (diff)
parent4fd4fa0fd24c9cd86161358f2e36cff64f3712d7 (diff)
downloadchouette-core-9b3778f8d2afe93486ea8e49ec7730cb1ec2be1e.tar.bz2
Merge remote-tracking branch 'origin/master' into 1726-WorkbenchImport-for-multi-Netex-import
Diffstat (limited to 'spec')
-rw-r--r--spec/decorators/referential_decorator_spec.rb5
-rw-r--r--spec/models/chouette/vehicle_journey_spec.rb4
-rw-r--r--spec/policies/referential_policy_spec.rb2
3 files changed, 6 insertions, 5 deletions
diff --git a/spec/decorators/referential_decorator_spec.rb b/spec/decorators/referential_decorator_spec.rb
index 5de6b7e95..16da8d30b 100644
--- a/spec/decorators/referential_decorator_spec.rb
+++ b/spec/decorators/referential_decorator_spec.rb
@@ -25,7 +25,7 @@ RSpec.describe ReferentialDecorator, type: [:helper, :decorator] do
end
end
- context 'all rights and different organisation' do
+ context 'all rights and different organisation' do
let( :user ){ build_stubbed :allmighty_user }
@@ -33,10 +33,11 @@ RSpec.describe ReferentialDecorator, type: [:helper, :decorator] do
expect_action_link_elements.to be_empty
expect_action_link_hrefs.to eq([
referential_time_tables_path(object),
+ new_referential_path(from: object),
])
end
end
- context 'all rights and same organisation' do
+ context 'all rights and same organisation' do
let( :user ){ build_stubbed :allmighty_user, organisation: referential.organisation }
diff --git a/spec/models/chouette/vehicle_journey_spec.rb b/spec/models/chouette/vehicle_journey_spec.rb
index c78ef5b33..c495becac 100644
--- a/spec/models/chouette/vehicle_journey_spec.rb
+++ b/spec/models/chouette/vehicle_journey_spec.rb
@@ -10,7 +10,7 @@ describe Chouette::VehicleJourney, :type => :model do
vehicle_journey.validate
expect(vjas[0].errors[:departure_time]).not_to be_blank
- expect(vehicle_journey.errors[:vehicle_journey_at_stops].count).to eq(1)
+ expect(vehicle_journey.errors.count).to eq(1)
expect(vehicle_journey).not_to be_valid
end
@@ -19,7 +19,7 @@ describe Chouette::VehicleJourney, :type => :model do
vehicle_journey.validate
expect(vjas[0].errors[:departure_time]).to be_blank
- expect(vehicle_journey.errors[:vehicle_journey_at_stops]).to be_empty
+ expect(vehicle_journey.errors).to be_empty
expect(vehicle_journey).to be_valid
end
diff --git a/spec/policies/referential_policy_spec.rb b/spec/policies/referential_policy_spec.rb
index 33d8e13e8..69d0eb17b 100644
--- a/spec/policies/referential_policy_spec.rb
+++ b/spec/policies/referential_policy_spec.rb
@@ -46,7 +46,7 @@ RSpec.describe ReferentialPolicy, type: :policy do
# ------------------
permissions :clone? do
- it_behaves_like 'permitted policy and same organisation', 'referentials.create', archived: true
+ it_behaves_like 'permitted policy', 'referentials.create', archived: true
end
permissions :archive? do