aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorjpl2017-02-21 16:46:11 +0100
committerjpl2017-02-21 16:46:11 +0100
commit0777b3af6bc7c24ef9b98e00bb7b76bffdc5d632 (patch)
treef9e2c63b880321e3a9e36c123203b61213a3c2af /spec
parenteae4f70c40464c011a31b56b3d7bf755ef7a3f1d (diff)
downloadchouette-core-0777b3af6bc7c24ef9b98e00bb7b76bffdc5d632.tar.bz2
Refs #2629: updating routes#show
Diffstat (limited to 'spec')
-rw-r--r--spec/views/routes/show.html.erb_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/views/routes/show.html.erb_spec.rb b/spec/views/routes/show.html.erb_spec.rb
index 1984a0d25..327ed1588 100644
--- a/spec/views/routes/show.html.erb_spec.rb
+++ b/spec/views/routes/show.html.erb_spec.rb
@@ -1,15 +1,15 @@
require 'spec_helper'
describe "/routes/show", :type => :view do
-
+
assign_referential
let!(:line) { assign :line, create(:line) }
let!(:route) { assign :route, create(:route, :line => line) }
let!(:map) { assign(:map, double(:to_html => '<div id="map"/>'.html_safe)) }
- it "should render h2 with the route name" do
+ it "should render h1 with the route name" do
render
- expect(rendered).to have_selector("h2", :text => Regexp.new(line.name))
+ expect(rendered).to have_selector("h1", :text => Regexp.new(line.name))
end
# it "should display a map with class 'line'" do
@@ -19,13 +19,12 @@ describe "/routes/show", :type => :view do
it "should render a link to edit the route" do
render
- expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.edit_referential_line_route_path(referential, line, route)}']")
+ expect(rendered).to have_selector("a[href='#{view.edit_referential_line_route_path(referential, line, route)}']")
end
it "should render a link to remove the route" do
render
- expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.referential_line_route_path(referential, line, route)}'][class='remove']")
+ expect(rendered).to have_selector("a[href='#{view.referential_line_route_path(referential, line, route)}']")
end
end
-