Sha256: 88cf123f788a32c2ea3c00ef15195b0a440a41a933dcce8f1a8d30c09c16fc26
Contents?: true
Size: 781 Bytes
Versions: 3
Compression:
Stored size: 781 Bytes
Contents
ENV['RACK_ENV'] = 'test' require_relative 'spec_helper' require 'rack/test' require 'json' describe Api::Web do include Rack::Test::Methods def app Api::Web.new end before(:all) do AuthManager::Base.redis_del({list: 'applications'}) AuthManager::Base.redis_del({ list: 'applications_sessions' } ) AuthManager::Base.redis_sadd({list: 'applications',object: {api_key: 'an api_key'}}) end context 'When an app attemps to log in' do it 'returns 200 code status for success' do post '/apps/connect', parameter_for('app') expect(last_response.status).to eq(200) end it 'returns 400 code status for faillure' do post '/apps/connect', bad_parameter_for('app') expect(last_response.status).to eq(400) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
recommender_api-0.0.5 | spec/web_spec.rb |
recommender_api-0.0.4 | spec/web_spec.rb |
recommender_api-0.0.3 | spec/web_spec.rb |