Guest User

Untitled

a guest
Apr 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. it "should notify user about successfull update" do
  2. put :update, :merchant => new_merchant_params
  3. flash[:notice].should == "Business profile was successfully updated"
  4. end
  5.  
  6. it "should notify user about failed update" do
  7. @merchant.should_receive(:update_profile).and_return(false)
  8. put :update, :merchant => new_merchant_params
  9. flash[:notice].should == "Can't update Business profile"
  10. end
  11.  
  12. it "should render profile page if update failed" do
  13. @merchant.should_receive(:update_profile).and_return(false)
  14. put :update, :merchant => new_merchant_params
  15. response.should render_template('show')
  16. end
Add Comment
Please, Sign In to add comment