Skip to content

Instantly share code, notes, and snippets.

@KensoDev
Created March 16, 2012 19:43
Show Gist options
  • Save KensoDev/2052153 to your computer and use it in GitHub Desktop.
Save KensoDev/2052153 to your computer and use it in GitHub Desktop.
test failing
before(:each) do
@user = Factory(:user)
@media = Factory(:media)
@place = Factory(:hotel)
controller.stub!(:current_user).and_return(@user)
end
it "saves the newly uploaded image" do
# Force the media width and height to be nil
@media.width = nil
@media.height = nil
@media.save
post :save, item_type: @place.class.name, item_id: @place.id, media: { id: @media.id }
response.should be_success
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment