OSDN Git Service

ご恩登録機能のCRUDをscaffoldベースで生成し実装
[on-kiroku/go_on_kiroku_tyou.git] / spec / views / goons / edit.html.erb_spec.rb
1 #encoding: utf-8
2
3 require 'spec_helper'
4
5 describe "goons/edit.html.erb" do
6   before(:each) do
7     @goon = assign(:goon, stub_model(Goon,
8       :title => "佐藤さんから誕生日プレゼントを貰った",
9       :who => "佐藤さん",
10       :where => "職場",
11       :description => "リラっくまのぬいぐるみを貰った"
12     ))
13   end
14
15   it "renders the edit goon form" do
16     render
17
18     # Run the generator again with the --webrat flag if you want to use webrat matchers
19     assert_select "form", :action => goon_path(@goon), :method => "post" do
20       assert_select "input#goon_title", :name => "goon[title]"
21       assert_select "input#goon_who", :name => "goon[who]"
22       assert_select "input#goon_where", :name => "goon[where]"
23       assert_select "textarea#goon_description", :name => "goon[description]"
24     end
25   end
26 end