Sha256: dc6e70fbf737688d399474b6f60333e2b4bb421d347bffe020efdb1744732620

Contents?: true

Size: 649 Bytes

Versions: 22

Compression:

Stored size: 649 Bytes

Contents

require 'test_helper'

class UsersTest < Lapse::TestCase
  def test_authenticate
    key = 'test_key'

    stub_request(:post, 'https://everlapse.com/api/v1/authenticate').with(:body => "{\"twitter_access_token\":\"#{key}\"}").
      to_return(:status => 200, :body => "{}", :headers => {"x-access-token" => 'fake_token'})

    result = unauthenticated_client.authenticate(key)
    assert_equal Hash.new, result.user
    assert_equal 'fake_token', result.access_token
  end

  def test_me
    stub_request(:get, 'https://everlapse.com/api/v1/me').to_return(:status => 200, :body => "{}")
    assert_equal Hash.new, authenticated_client.me
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
lapse-0.1.0 test/lapse/client/users_test.rb
lapse-0.0.23 test/lapse/client/users_test.rb
lapse-0.0.22 test/lapse/client/users_test.rb
lapse-0.0.21 test/lapse/client/users_test.rb
lapse-0.0.20 test/lapse/client/users_test.rb
lapse-0.0.19 test/lapse/client/users_test.rb
lapse-0.0.18 test/lapse/client/users_test.rb
lapse-0.0.17 test/lapse/client/users_test.rb
lapse-0.0.16 test/lapse/client/users_test.rb
lapse-0.0.15 test/lapse/client/users_test.rb
lapse-0.0.14 test/lapse/client/users_test.rb
lapse-0.0.13 test/lapse/client/users_test.rb
lapse-0.0.12 test/lapse/client/users_test.rb
lapse-0.0.11 test/lapse/client/users_test.rb
lapse-0.0.10 test/lapse/client/users_test.rb
lapse-0.0.9 test/lapse/client/users_test.rb
lapse-0.0.8 test/lapse/client/users_test.rb
lapse-0.0.7 test/lapse/client/users_test.rb
lapse-0.0.6 test/lapse/client/users_test.rb
lapse-0.0.5 test/lapse/client/users_test.rb