summaryrefslogtreecommitdiff
path: root/spec/views/matches/edit.html.erb_spec.rb
blob: fca468f1d97ea8ec75976e64e757d6924dfa3cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

describe "matches/edit" do
  before(:each) do
    @match = assign(:match, stub_model(Match,
      :tournament => nil,
      :name => "MyString"
    ))
  end

  it "renders the edit match form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form[action=?][method=?]", match_path(@match), "post" do
      assert_select "input#match_tournament[name=?]", "match[tournament]"
      assert_select "input#match_name[name=?]", "match[name]"
    end
  end
end