aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views
diff options
context:
space:
mode:
authorAlban Peignier2017-12-20 22:33:53 +0100
committerAlban Peignier2017-12-20 22:33:53 +0100
commitc955658d634c5975af446ca9885903ff8fa2c0a9 (patch)
tree40094e623ffccd052d5c078d5dae691bd79cbf5e /spec/views
parentffa7c137f0d06f37f67561f09472b304efa90069 (diff)
downloadchouette-core-c955658d634c5975af446ca9885903ff8fa2c0a9.tar.bz2
Check stop_area_waiting_time feature to display StopArea#waiting_time. Refs #53515351-stop-area-waiting-time
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/stop_areas/edit.html.erb_spec.rb5
-rw-r--r--spec/views/stop_areas/new.html.erb_spec.rb4
2 files changed, 8 insertions, 1 deletions
diff --git a/spec/views/stop_areas/edit.html.erb_spec.rb b/spec/views/stop_areas/edit.html.erb_spec.rb
index 5105bff4b..bfbb0bb55 100644
--- a/spec/views/stop_areas/edit.html.erb_spec.rb
+++ b/spec/views/stop_areas/edit.html.erb_spec.rb
@@ -6,6 +6,10 @@ describe "/stop_areas/edit", :type => :view do
let!(:stop_area) { assign(:stop_area, create(:stop_area)) }
let!(:map) { assign(:map, double(:to_html => '<div id="map"/>'.html_safe)) }
+ before do
+ allow(view).to receive(:has_feature?)
+ end
+
describe "form" do
it "should render input for name" do
render
@@ -13,6 +17,5 @@ describe "/stop_areas/edit", :type => :view do
with_tag "input[type=text][name='stop_area[name]'][value=?]", stop_area.name
end
end
-
end
end
diff --git a/spec/views/stop_areas/new.html.erb_spec.rb b/spec/views/stop_areas/new.html.erb_spec.rb
index 749782349..23f7387fa 100644
--- a/spec/views/stop_areas/new.html.erb_spec.rb
+++ b/spec/views/stop_areas/new.html.erb_spec.rb
@@ -5,6 +5,10 @@ describe "/stop_areas/new", :type => :view do
let!(:stop_area_referential) { assign :stop_area_referential, stop_area.stop_area_referential }
let!(:stop_area) { assign(:stop_area, build(:stop_area)) }
+ before do
+ allow(view).to receive(:has_feature?)
+ end
+
describe "form" do
it "should render input for name" do