Skip to content

Commit

Permalink
update to 2.3 cookie behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
emiddleton committed Jul 31, 2009
1 parent e1d4a9c commit 214da3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spec/controllers/accounts_controller_spec.rb
Expand Up @@ -24,7 +24,7 @@ def make_request

it 'sets typo_user_profile cookie' do
make_request
cookies[:typo_user_profile].should == ['admin']
cookies[:typo_user_profile].should == 'admin'
end

it 'redirects to /bogus/location' do
Expand Down Expand Up @@ -261,7 +261,7 @@ def params
it 'logging out deletes cookies containing credentials' do
@user.should_receive(:forget_me)
get 'logout'
cookies[:auth_token].should == []
cookies[:typo_user_profile].should == []
cookies[:auth_token].should == nil
cookies[:typo_user_profile].should == nil
end
end
6 changes: 3 additions & 3 deletions spec/controllers/comments_controller_spec.rb
Expand Up @@ -38,19 +38,19 @@

it "should set an author cookie" do
make_the_request
cookies["author"].should == ['bob']
cookies["author"].should == 'bob'
end

it "should set a gravatar_id cookie" do
make_the_request(:body => 'content', :author => 'bob',
:email => 'bob@home', :url => 'http://bobs.home/')
cookies["gravatar_id"].should == [Digest::MD5.hexdigest('bob@home')]
cookies["gravatar_id"].should == Digest::MD5.hexdigest('bob@home')
end

it "should set a url cookie" do
make_the_request(:body => 'content', :author => 'bob',
:email => 'bob@home', :url => 'http://bobs.home/')
cookies["url"].should == ['http://bobs.home/']
cookies["url"].should == 'http://bobs.home/'
end

it "should create a comment" do
Expand Down

0 comments on commit 214da3e

Please sign in to comment.