Created
October 8, 2012 01:05
-
-
Save adammiribyan/3850210 to your computer and use it in GitHub Desktop.
Controller spec refactoring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "#start_phone_call", :focus do | |
before :each do | |
@harry = FactoryGirl.create(:client, first_name: "Harry", stripe_customer_token: nil) | |
@arnold = FactoryGirl.create(:lawyer, first_name: "Arnold") | |
controller.stubs(:current_user).returns(@harry) | |
end | |
it "should redirect to payment info page unless client has already has it saved" do | |
get :start_phone_call, { id: @arnold.to_param, client_number: "6087004680" } | |
request.should redirect_to call_payment_path(@arnold.to_param) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment