diff options
Diffstat (limited to 'spec/models/profile_photo_spec.rb')
-rw-r--r-- | spec/models/profile_photo_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/profile_photo_spec.rb b/spec/models/profile_photo_spec.rb index b7d45b8ae..1e33c5b61 100644 --- a/spec/models/profile_photo_spec.rb +++ b/spec/models/profile_photo_spec.rb @@ -32,6 +32,16 @@ describe ProfilePhoto, "when constructing a new photo" do profile_photo.image.columns.should == 96 profile_photo.image.rows.should == 96 end + + it 'should accept a draft PNG and not resize it' do + data = load_file_fixture("parrot.png") + profile_photo = ProfilePhoto.new(:draft => true, :data => data) + profile_photo.valid?.should == true + profile_photo.image.format.should == 'PNG' + profile_photo.image.columns.should == 198 + profile_photo.image.rows.should == 289 + end + end |