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/requests/lines_spec.rb | |
| parent | e632a4634b1762f4c73d11f1e5b127de9832a1ff (diff) | |
| download | chouette-core-3bc6d313bebdc1f03e4021aabbc774a0cd97d938.tar.bz2 | |
Initialize rails 4 migration
Diffstat (limited to 'spec/requests/lines_spec.rb')
| -rw-r--r-- | spec/requests/lines_spec.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/spec/requests/lines_spec.rb b/spec/requests/lines_spec.rb deleted file mode 100644 index b851f522a..000000000 --- a/spec/requests/lines_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- -require 'spec_helper' - -describe "Lines" do - login_user - - let!(:network) { Factory(:network) } - let!(:company) { Factory(:company) } - let!(:lines) { Array.new(2) { Factory(:line_with_stop_areas, :network => network, :company => company) } } - subject { lines.first } - - describe "list" do - it "display lines" do - visit referential_lines_path(referential) - page.should have_content(lines.first.name) - page.should have_content(lines.last.name) - end - - end - - - describe "show" do - it "display line" do - visit referential_lines_path(referential) - click_link "#{lines.first.name}" - page.should have_content(lines.first.name) - end - - it "display map" do - visit referential_lines_path(referential) - click_link "#{lines.first.name}" - page.should have_selector("#map", :class => 'line') - end - - end - - describe "new" do - it "creates line and return to show" do - visit referential_lines_path(referential) - click_link "Ajouter une ligne" - fill_in "Nom", :with => "Line 1" - fill_in "Numéro d'enregistrement", :with => "1" - fill_in "Identifiant Neptune", :with => "test:Line:999" - click_button("Créer ligne") - page.should have_content("Line 1") - end - end - - describe "edit and return to show" do - it "edit line" do - visit referential_line_path(referential, subject) - click_link "Modifier cette ligne" - fill_in "Nom", :with => "Line Modified" - fill_in "Numéro d'enregistrement", :with => "test-1" - click_button("Modifier ligne") - page.should have_content("Line Modified") - end - end - -end |
