Permalink
Browse files

fixed failing test

  • Loading branch information...
1 parent cf1c450 commit 2470f7d4d0008f00e259cfc787c71a64372e745c @libryder committed Mar 26, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 spec/controllers/tours_controller_spec.rb
@@ -24,6 +24,7 @@
@user = User.create({
:email => 'none@test.com'
})
+ @user.update_attribute "ip", "127.0.0.1"
cookies[:user] = { :value => @user.id, :expires => 1.year.from_now }
end
# This should return the minimal set of attributes required to create a valid
@@ -50,6 +51,7 @@ def valid_session
describe "GET show" do
it "assigns the requested tour as @tour" do
tour = Tour.create! valid_attributes
+ tour.update_attribute "user_id", @user.id
get :show, {:id => tour.to_param}, valid_session
assigns(:tour).should eq(tour)
end

0 comments on commit 2470f7d

Please sign in to comment.