diff options
| author | Luc Donnet | 2015-01-07 21:58:56 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2015-01-07 21:58:56 +0100 | 
| commit | baaed4653623cfc918ada7250c4fd879aad28893 (patch) | |
| tree | ec1e7da111c2ccd95f82013e2d40d6b455f80815 /spec/features/routes_spec.rb | |
| parent | c39887f2e4f6a12ab3af205c58a1330d8b28f5e9 (diff) | |
| download | chouette-core-baaed4653623cfc918ada7250c4fd879aad28893.tar.bz2 | |
Fix spec and update devise usage
Diffstat (limited to 'spec/features/routes_spec.rb')
| -rw-r--r-- | spec/features/routes_spec.rb | 22 | 
1 files changed, 13 insertions, 9 deletions
| diff --git a/spec/features/routes_spec.rb b/spec/features/routes_spec.rb index da4120309..0c98f8725 100644 --- a/spec/features/routes_spec.rb +++ b/spec/features/routes_spec.rb @@ -10,51 +10,55 @@ describe "Routes", :type => :feature do    describe "from lines page to a line page" do      it "display line's routes" do -      pending        visit referential_lines_path(referential)        click_link "#{line.name}"        expect(page).to have_content(route.name)        expect(page).to have_content(route2.name)      end    end +      describe "from line's page to route's page" do      it "display route properties" do -      pending        visit referential_line_path(referential,line)        click_link "#{route.name}"        expect(page).to have_content(route.name)        expect(page).to have_content(route.number)      end    end +      describe "from line's page, create a new route" do            it "return to line's page that display new route" do -      pending        visit referential_line_path(referential,line)        click_link "Ajouter une séquence d'arrêts" -      fill_in "Nom", :with => "A to B" +      save_and_open_page +      fill_in "route_name", :with => "A to B"        fill_in "Indice", :with => "AB" +      select 'aller', :from => "route_direction_code" +      select 'aller', :from => "route_wayback_code"         click_button("Créer Séquence d'arrêts")        expect(page).to have_content("A to B")      end    end +      describe "from line's page, select a route and edit it" do            it "return to line's page with changed name" do -      pending        visit referential_line_path(referential,line)        click_link "#{route.name}"        click_link "Modifier cette séquence d'arrêts" -      fill_in "Nom", :with => "#{route.name}-changed" +      save_and_open_page +      fill_in "route_name", :with => "#{route.name}-changed" +      save_and_open_page        click_button("Modifier Séquence d'arrêts")        expect(page).to have_content("#{route.name}-changed")      end    end +      describe "from line's page, select a route and delete it" do            it "return to line's page without route name" do -      pending        visit referential_line_path(referential,line)        click_link "#{route.name}" -      #click_link "Supprimer cette séquence d'arrêts" -      #page.should_not have_content(route.name) +      click_link "Supprimer cette séquence d'arrêts" +      expect(page).not_to have_content(route.name)      end    end  end | 
