Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "should create a user if an unused email is provided" do
- VCR.use_cassette('create_user_with_email', :record => :new_episodes) do
- options = {:email => 'carl@youngbloods.org'}
- UUIDTools::UUID.stub!(:random_create).and_return('7c4037cc-e021-48c0-990a-51b3e82d48d6')
- response = @api.create_user(options)
- response.should be_a(Hash)
- response['guid']
- end
- end
- it 'should raise an exception if the supplied email address is already in use' do
- VCR.use_cassette('duplicate_email', :record => :new_episodes) do
- options = {:email => 'carl@youngbloods.org'}
- lambda { @api.create_user(options) }.should raise_exception(RuntimeError, "Unable to create user: email has already been taken")
- end
- end
Add Comment
Please, Sign In to add comment