blob: d43ba588ca80be0376bda58f1468fee1359e349e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
require 'spec_helper'
describe "/timebands/show", :type => :view do
assign_referential
let!(:timeband) { assign(:timeband, create(:timeband)) }
it "should render h2 with the timeband name" do
render
expect(rendered).to have_selector("h2", text: Regexp.new(timeband.name))
end
it "should render a link to edit the timeband" do
render
expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.edit_referential_timeband_path(referential, timeband)}']")
end
it "should render a link to remove the timeband" do
render
expect(view.content_for(:sidebar)).to have_selector(".actions a[href='#{view.referential_timeband_path(referential, timeband)}'][class='remove']")
end
end
|