diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-26 01:03:35 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-26 01:03:35 +0000 |
commit | 673b5cc3939e9abc3bc1f5984f2a61ed45b70529 (patch) | |
tree | 5b02800891270972a8946518f37fb807f2b9b7d8 /spec/controllers/user_controller_spec.rb | |
parent | 0e546a79b205124d7b95b89e4a2e9cc520a4fc10 (diff) | |
parent | 6d7bea575ec185379efb648f6bbbd520029e3a91 (diff) |
Merge branch 'release/0.5' into develop
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index d8e92fbd0..a90fa18df 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -11,6 +11,7 @@ describe UserController, "when showing a user" do fixtures :users, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) + rebuild_xapian_index end it "should be successful" do @@ -542,6 +543,13 @@ describe UserController, "when using profile photos" do post :set_profile_photo, { :id => @user.id, :file => @uploadedfile, :submitted_draft_profile_photo => 1, :automatically_crop => 1 } end + it "should return a 404 not a 500 when a profile photo has not been set" do + @user.profile_photo.should be_nil + lambda { + get :get_profile_photo, {:url_name => @user.url_name } + }.should raise_error(ActiveRecord::RecordNotFound) + end + it "should let you change profile photo if you're logged in as the user" do @user.profile_photo.should be_nil session[:user_id] = @user.id |