aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/journey_pattern_spec.rb
diff options
context:
space:
mode:
authorLuc Donnet2015-01-15 17:48:11 +0100
committerLuc Donnet2015-01-15 17:48:11 +0100
commit19e95457a20116f5944fe2d7bb07675b564bc930 (patch)
tree231ad126f79522e7e5e796e49a24b042844599d8 /spec/features/journey_pattern_spec.rb
parentc89c3508eb953e79165ba61aee878db8e4d15ff5 (diff)
downloadchouette-core-19e95457a20116f5944fe2d7bb07675b564bc930.tar.bz2
Reactivate specs for journey_pattern and stop_point
Diffstat (limited to 'spec/features/journey_pattern_spec.rb')
-rw-r--r--spec/features/journey_pattern_spec.rb32
1 files changed, 12 insertions, 20 deletions
diff --git a/spec/features/journey_pattern_spec.rb b/spec/features/journey_pattern_spec.rb
index f57bf2952..1e50b47c7 100644
--- a/spec/features/journey_pattern_spec.rb
+++ b/spec/features/journey_pattern_spec.rb
@@ -4,55 +4,47 @@ require 'spec_helper'
describe "JourneyPatterns", :type => :feature do
login_user
- let(:line) { Factory(:line) }
- let(:route) { Factory(:route, :line => line) }
- let(:journey_pattern) { Factory(:journey_pattern, :route => route) }
+ let!(:line) { create(:line) }
+ let!(:route) { create(:route, :line => line) }
+ let!(:journey_pattern) { create(:journey_pattern, :route => route) }
describe "from routes page to a journey_pattern page" do
it "display route's journey_patterns" do
- pending
- visit referential_line_route_path(referential,line,route)
+ visit referential_line_route_path(referential,line,route)
+ click_link "Liste des missions"
expect(page).to have_content(journey_pattern.name)
end
end
+
describe "from route's page to journey_pattern's page" do
it "display journey_pattern properties" do
- pending
visit referential_line_route_path(referential,line,route)
+ click_link "Liste des missions"
click_link "#{journey_pattern.name}"
expect(page).to have_content(journey_pattern.published_name)
expect(page).to have_content(journey_pattern.comment)
expect(page).to have_content(journey_pattern.registration_number)
end
end
+
describe "from route's page, create a new journey_pattern" do
it "return to route's page that display new journey_pattern" do
- pending
visit referential_line_route_path(referential,line,route)
click_link "Ajouter une mission"
fill_in "Nom", :with => "A to B"
fill_in "Comment", :with => "AB"
- click_button("Créer mission")
+ click_button("Créer Mission")
expect(page).to have_content("A to B")
end
end
- describe "from route's page, select a journey_pattern and edit it" do
- it "return to route's page with changed name" do
- pending
- visit referential_line_route_path(referential,line,route)
- click_link "#{journey_pattern.name}"
- click_link "Modifier cette mission"
- fill_in "Nom", :with => "#{journey_pattern.name}-changed"
- click_button("Modifier mission")
- expect(page).to have_content("#{journey_pattern.name}-changed")
- end
- end
+
describe "from route's page, select a journey_pattern and delete it" do
it "return to route's page without journey_pattern name" do
- pending
visit referential_line_route_path(referential,line,route)
+ click_link "Liste des missions"
click_link "#{journey_pattern.name}"
click_link "Supprimer cette mission"
+ click_link "Liste des missions"
expect(page).not_to have_content(journey_pattern.name)
end
end