diff options
| author | Luc Donnet | 2015-01-05 14:56:12 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2015-01-05 14:56:12 +0100 | 
| commit | 3bc6d313bebdc1f03e4021aabbc774a0cd97d938 (patch) | |
| tree | ac5b8c6d8309012136606d9fd9b9a00290f486a8 /spec/features/journey_pattern_spec.rb | |
| parent | e632a4634b1762f4c73d11f1e5b127de9832a1ff (diff) | |
| download | chouette-core-3bc6d313bebdc1f03e4021aabbc774a0cd97d938.tar.bz2 | |
Initialize rails 4 migration
Diffstat (limited to 'spec/features/journey_pattern_spec.rb')
| -rw-r--r-- | spec/features/journey_pattern_spec.rb | 60 | 
1 files changed, 60 insertions, 0 deletions
| diff --git a/spec/features/journey_pattern_spec.rb b/spec/features/journey_pattern_spec.rb new file mode 100644 index 000000000..f57bf2952 --- /dev/null +++ b/spec/features/journey_pattern_spec.rb @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +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) } + +  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) +      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 "#{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") +      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 "#{journey_pattern.name}" +      click_link "Supprimer cette mission" +      expect(page).not_to have_content(journey_pattern.name) +    end +  end +end + | 
