Sha256: b2b6c141a2dc368b515d0b337b8d8fc49aad09f1f419ab0d9b0c49e7c77f2c49

Contents?: true

Size: 1.08 KB

Versions: 35

Compression:

Stored size: 1.08 KB

Contents

require './test/test_helper'

class TokenTest < Minitest::Test

  def get_first_token
    VCR.use_cassette('token get first token') do
      @first_token = Access::Token.search(per_page: 1).oauth_tokens.first
    end
  end

  def test_tokens_search
    VCR.use_cassette('token search') do
      tokens_response = Access::Token.search(per_page: 1)
      assert tokens_response.success
      first_token = tokens_response.oauth_tokens.first
      assert_kind_of Access::TokenResponse, tokens_response
      assert_kind_of Access::Link, tokens_response.links
      assert_kind_of Access::Info, tokens_response.info
      assert_kind_of Array, tokens_response.oauth_tokens
      assert_kind_of Access::Token, first_token
      assert_kind_of Access::Link, first_token.links
    end
  end

  def test_tokens_find
    get_first_token
    VCR.use_cassette('token find') do
      tokens_response = Access::Token.find(@first_token.token)
      assert tokens_response.success
      assert_kind_of Access::TokenResponse, tokens_response
      assert_kind_of Access::Token, tokens_response.oauth_token
    end
  end

end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
access-2.0.48 test/access/token_test.rb
access-2.0.47 test/access/token_test.rb
access-2.0.46 test/access/token_test.rb
access-2.0.44 test/access/token_test.rb
access-2.0.43 test/access/token_test.rb
access-2.0.42 test/access/token_test.rb
access-2.0.41 test/access/token_test.rb
access-2.0.40 test/access/token_test.rb
access-2.0.39 test/access/token_test.rb
access-2.0.38 test/access/token_test.rb
access-2.0.37 test/access/token_test.rb
access-2.0.36 test/access/token_test.rb
access-2.0.34 test/access/token_test.rb
access-2.0.33 test/access/token_test.rb
access-2.0.32 test/access/token_test.rb
access-2.0.31 test/access/token_test.rb
access-2.0.30 test/access/token_test.rb
access-2.0.29 test/access/token_test.rb
access-2.0.28 test/access/token_test.rb
access-2.0.27 test/access/token_test.rb