Commit 1ee5c472
Changed files (1)
spec
controllers
spec/controllers/avatars_controller_spec.rb
@@ -3,9 +3,7 @@ require "spec_helper"
describe AvatarsController do
let(:user) { FactoryGirl.create(:user) }
- before :each do
- http_login(user)
- end
+ before { http_login(user) }
describe :create do
context "when uploading a new avatar" do
@@ -16,6 +14,10 @@ describe AvatarsController do
it "should save the new avatar" do
Avatar.last.should_not be_nil
end
+
+ it "should redirect to the profile page" do
+ response.should redirect_to(profile_path(user))
+ end
end
end
end