diff options
| author | Alban Peignier | 2016-05-15 10:25:11 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2016-05-15 10:25:11 +0200 | 
| commit | 297727032a0c1fddfbb9d8864deda1ec24ea36f6 (patch) | |
| tree | 62868de1770546b748b5fec3c59e806cbe5c8f21 /spec/features/access_points_spec.rb | |
| parent | affbacfcd955230f66badb261dcc462cca9cd0b9 (diff) | |
| download | chouette-core-297727032a0c1fddfbb9d8864deda1ec24ea36f6.tar.bz2 | |
Associate StopAreaReferential to Referential. Create ReferentialStopAreas to manage lines in Referential. Refs #822
Diffstat (limited to 'spec/features/access_points_spec.rb')
| -rw-r--r-- | spec/features/access_points_spec.rb | 69 | 
1 files changed, 32 insertions, 37 deletions
| diff --git a/spec/features/access_points_spec.rb b/spec/features/access_points_spec.rb index c0f9a157a..a78545ee4 100644 --- a/spec/features/access_points_spec.rb +++ b/spec/features/access_points_spec.rb @@ -4,7 +4,6 @@ require 'spec_helper'  describe "Access points", :type => :feature do    login_user -  let(:stop_area_referential) { stop_area.stop_area_referential }    let!(:stop_area) { create(:stop_area) }    let!(:access_points) { Array.new(2) { create(:access_point, :stop_area => stop_area) } }    subject { access_points.first } @@ -23,46 +22,42 @@ describe "Access points", :type => :feature do    describe "show" do -    # FIXME #821 -    # it "displays an access point" do -    #   access_points.each do |ap| -    #     visit stop_area_referential_stop_area_path(stop_area_referential, stop_area) -    #     click_link ap.name -    #     expect(page).to have_content(ap.name) -    #   end -    # end +    it "displays an access point" do +      access_points.each do |ap| +        visit referential_stop_area_path(referential, stop_area) +        click_link ap.name +        expect(page).to have_content(ap.name) +      end +    end -    # FIXME #821 -    # it "displays a map" do -    #   access_points.each do |ap| -    #     visit stop_area_referential_stop_area_path(stop_area_referential, stop_area) -    #     click_link ap.name -    #     expect(page).to have_selector("#map.access_point") -    #   end -    # end +    it "displays a map" do +      access_points.each do |ap| +        visit referential_stop_area_path(referential, stop_area) +        click_link ap.name +        expect(page).to have_selector("#map.access_point") +      end +    end    end -  # FIXME #821 -  # describe "new" do -  #   it "creates an access point" do -  #     visit stop_area_referential_stop_area_path(stop_area_referential, stop_area) -  #     click_link I18n.t("access_points.actions.new") -  #     fill_in "access_point[name]", :with => "My Access Point Name" -  #     click_button(I18n.t('formtastic.create',model: I18n.t('activerecord.models.access_point.one'))) -  #     expect(page).to have_content("My Access Point Name") -  #   end -  # end +  describe "new" do +    it "creates an access point" do +      visit referential_stop_area_path(referential, stop_area) +      click_link I18n.t("access_points.actions.new") +      fill_in "access_point[name]", :with => "My Access Point Name" +      click_button(I18n.t('formtastic.create',model: I18n.t('activerecord.models.access_point.one'))) +      expect(page).to have_content("My Access Point Name") +    end +  end -  # FIXME #821 -  # describe "edit" do -  #   it "edits an acess point" do -  #     visit stop_area_referential_stop_area_access_point_path(stop_area_referential, stop_area, subject) -  #     click_link I18n.t("access_points.actions.edit") -  #     fill_in "access_point[name]", :with => "My New Access Point Name" -  #     click_button(I18n.t('formtastic.update',model: I18n.t('activerecord.models.access_point.one'))) -  #     expect(page).to have_content("My New Access Point Name") -  #   end -  # end +  describe "edit" do +    it "edits an acess point" do +      visit referential_stop_area_access_point_path(referential, stop_area, subject) +      click_link I18n.t("access_points.actions.edit") +      fill_in "access_point[name]", :with => "My New Access Point Name" +      click_button(I18n.t('formtastic.update',model: I18n.t('activerecord.models.access_point.one'))) +      expect(page).to have_content("My New Access Point Name") +    end +  end  end | 
