Sha256: e03d69cc67b517eac3bb7c83f435c5b4bc65771fa4d3b254fc6d8fd8d8069922
Contents?: true
Size: 544 Bytes
Versions: 2
Compression:
Stored size: 544 Bytes
Contents
require 'spec_helper' describe 'Verify integration' do it 'should require a code' do post '/verify' last_status.must_equal 400 last_json['error'].must_equal 'bad_request' end it 'should require a valid code' do post '/verify', code: 'asdf' last_status.must_equal 400 last_json['error'].must_equal 'invalid_code' phone = Tincan::PhoneNumber.create!('+14152751660') post '/verify', code: phone.code last_status.must_equal 200 get "/#{phone.id}" last_json['verified_at'].wont_be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tincan-0.1.6 | spec/integration/verify_spec.rb |
tincan-0.1.5 | spec/integration/verify_spec.rb |