MJS RJS Fix initialization of album test

This commit is contained in:
Michael Sofaer 2010-09-19 18:12:42 -07:00
parent 60e29f6572
commit 27c00bae90

View file

@ -9,14 +9,14 @@ describe AlbumsController do
render_views
before do
@user = Factory.create(:user)
@user.aspect(:name => "lame-os")
@album = Factory.create(:album)
@aspect = @user.aspect(:name => "lame-os")
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
sign_in :user, @user
end
it "should update the name of an album" do
sign_in :user, @user
put :update, :id => @album._id, :album => { :name => "new_name"}
put :update, :id => @album.id, :album => { :name => "new_name"}
@album.reload.name.should eql("new_name")
end