Add test for Opera photo upload.
This commit is contained in:
parent
b999617dde
commit
dcd7e936df
1 changed files with 12 additions and 0 deletions
|
|
@ -14,6 +14,18 @@ describe PhotosController do
|
||||||
request.env["HTTP_REFERER"] = ''
|
request.env["HTTP_REFERER"] = ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#create' do
|
||||||
|
before do
|
||||||
|
@params = {:photo => {:aspect_ids => "all"}, :qqfile => Rack::Test::UploadedFile.new("spec/fixtures/button.png", "image/png") }
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'accepts a photo from a regular form submission' do
|
||||||
|
lambda {
|
||||||
|
post :create, @params
|
||||||
|
}.should change(Photo, :count).by(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#create' do
|
describe '#create' do
|
||||||
before do
|
before do
|
||||||
@controller.stub!(:file_handler).and_return(uploaded_photo)
|
@controller.stub!(:file_handler).and_return(uploaded_photo)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue