Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given "a page" do
- @user = User.create! :login => 'ari brown',
- :password => 'drowssap'
- @group = @user.create_group :name => 'Amarna'
- @page = @group.pages.create! :title => 'test'
- end
- And "an authorized user" do
- session[:user_id] = @user.id # shameless hack!
- end
- When "I try to change its title to 'Monkey'" do
- @data = {:page => {:title => 'Monkey'}}
- post "/groups/#{@group.id}/pages/#{@page.id}", @data
- end
- Then "it will be a success" do
- response.should be_success
- @page.reload.title.should == 'Monkey'
- end
Add Comment
Please, Sign In to add comment