forked from bofh/fetsite
change meetings
This commit is contained in:
20
spec/views/fetmeetings/edit.html.erb_spec.rb
Normal file
20
spec/views/fetmeetings/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fetmeetings/edit" do
|
||||
before(:each) do
|
||||
@fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
|
||||
:tnlist => "MyText",
|
||||
:typ => 1
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit fetmeeting form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", fetmeeting_path(@fetmeeting), "post" do
|
||||
assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
|
||||
assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
|
||||
end
|
||||
end
|
||||
end
|
||||
23
spec/views/fetmeetings/index.html.erb_spec.rb
Normal file
23
spec/views/fetmeetings/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fetmeetings/index" do
|
||||
before(:each) do
|
||||
assign(:fetmeetings, [
|
||||
stub_model(Fetmeeting,
|
||||
:tnlist => "MyText",
|
||||
:typ => 1
|
||||
),
|
||||
stub_model(Fetmeeting,
|
||||
:tnlist => "MyText",
|
||||
:typ => 1
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of fetmeetings" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
assert_select "tr>td", :text => 1.to_s, :count => 2
|
||||
end
|
||||
end
|
||||
20
spec/views/fetmeetings/new.html.erb_spec.rb
Normal file
20
spec/views/fetmeetings/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fetmeetings/new" do
|
||||
before(:each) do
|
||||
assign(:fetmeeting, stub_model(Fetmeeting,
|
||||
:tnlist => "MyText",
|
||||
:typ => 1
|
||||
).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new fetmeeting form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", fetmeetings_path, "post" do
|
||||
assert_select "textarea#fetmeeting_tnlist[name=?]", "fetmeeting[tnlist]"
|
||||
assert_select "input#fetmeeting_typ[name=?]", "fetmeeting[typ]"
|
||||
end
|
||||
end
|
||||
end
|
||||
17
spec/views/fetmeetings/show.html.erb_spec.rb
Normal file
17
spec/views/fetmeetings/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fetmeetings/show" do
|
||||
before(:each) do
|
||||
@fetmeeting = assign(:fetmeeting, stub_model(Fetmeeting,
|
||||
:tnlist => "MyText",
|
||||
:typ => 1
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/MyText/)
|
||||
rendered.should match(/1/)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user