aboutsummaryrefslogtreecommitdiffstats
path: root/spec/views/timebands/edit.html.erb_spec.rb
blob: 5f605188455ab1aa4e68f63c7538bc6c5494f438 (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/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_field('timeband[name]')
      expect(rendered).to have_field('timeband[start_time(4i)]')
      expect(rendered).to have_field('timeband[start_time(5i)]')
      expect(rendered).to have_selector('button[type=submit]')
    end

  end
end