aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/timebands/show.html.erb_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/timebands/show.html.erb_spec.rb')
-rw-r--r--spec/views/timebands/show.html.erb_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/views/timebands/show.html.erb_spec.rb b/spec/views/timebands/show.html.erb_spec.rb
new file mode 100644
index 000000000..d43ba588c
--- /dev/null
+++ b/spec/views/timebands/show.html.erb_spec.rb
@@ -0,0 +1,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
+