Created
March 24, 2014 19:44
-
-
Save dmitrym0/9747598 to your computer and use it in GitHub Desktop.
This file contains 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
it "throws an error if bookguid has been reused" do | |
payload = {:bookGuid => "ABC123", :backingFile=> "/tmp/test.epub", :previewPercentage => "10", :queueItemId => SecureRandom.uuid}; | |
Rm::Api::OnboardingController.any_instance.stubs(:does_guid_exist?).returns(true) | |
get :onboarding, payload | |
response.status.should == 400 | |
json = JSON.parse(response.body) | |
json["ErrorCode"].should include "DUPLICATE_GUID" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment