aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/timebands/edit.html.erb_spec.rb
blob: 26c85c22913797169f51f82c4083462f7b987c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe "/timebands/edit", :type => :view do
  assign_referential
  let!(:timeband) { assign(:timeband, create(:timeband) ) }

  describe "test" do
    it "should render h2 with the group name" do
      render
      expect(rendered).to have_selector("h2", text: Regexp.new(timeband.name))
    end
  end

  describe "form" do
    it "should render input for timeband" do
      render
      expect(rendered).to have_selector("form") do
        with_tag "input[type=text][name='timeband[name]'][value=?]", timeband.name
      end
    end

  end
end