This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Glenn Murray
committed
Aug 7, 2008
1 parent
c4787d1
commit 3ccaea1
Showing
2 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
require File.dirname(__FILE__) + '/../../../spec_helper' | ||
|
||
describe 'admin/product/remove' do | ||
it 'should render' do | ||
assigns[:product] = Product.new | ||
describe 'admin/product/remove' do | ||
def render_remove | ||
render 'admin/product/remove' | ||
end | ||
|
||
before(:each) do | ||
assigns[:product] = Product.new | ||
end | ||
|
||
it 'should render' do | ||
render_remove | ||
end | ||
|
||
it 'should include the authenticity token in a hidden input' do | ||
template.stub!(:form_authenticity_token).and_return('MY SUPER SECRET TOKEN') | ||
render_remove | ||
|
||
response.should have_tag("form") do | ||
with_tag("input[type='hidden'][name='authenticity_token'][value=?]", 'MY SUPER SECRET TOKEN') | ||
end | ||
end | ||
|
||
it 'should post the form' do | ||
render_remove | ||
response.should have_tag("form[method='post']", :count => 1) | ||
end | ||
end |