Sha256: 1b3f0f3571f4ac08cd28a6faa16dc7b76d0c04be2937035be29cee724f791b6c

Contents?: true

Size: 624 Bytes

Versions: 6

Compression:

Stored size: 624 Bytes

Contents

require 'test/unit'
require_relative '../lib/allegro_api_client'

class APIClientTests < Test::Unit::TestCase
  def test_environment_variables
    assert_not_nil ENV['API_URI'], "You need to set the API_URI environment variable"
    assert_not_nil ENV['AUTH_TOKEN'], "You need to set the AUTH_TOKEN environment variable"
  end

  def test_get
    ENV['API_URI'] = 'https://bob.com'
    api_client = APIClient.new http_client:self
    api_client.get(path:'/bob face')
    assert_equal('https://bob.com/bob%20face',@path)
  end

  def get(path, options)
  	@path = path
  	return self
  end

  def body
  	{}.to_json
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
allegro_api_client-0.0.9 test/test_git_repository_commit.rb
allegro_api_client-0.0.8 test/test_git_repository_commit.rb
allegro_api_client-0.0.7 test/test_git_repository_commit.rb
allegro_api_client-0.0.6 test/test_git_repository_commit.rb
allegro_api_client-0.0.5 test/test_git_repository_commit.rb
allegro_api_client-0.0.4 test/test_git_repository_commit.rb