Sha256: f9fb7907ab5e0c6088f5f3d785265a92f65d32700b7c5354305f46bc39095ecd

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 Bytes

Contents

# -*- encoding: utf-8 -*-
require "helper"

describe CentrumFaktur::Customer do
  before do
    CentrumFaktur.configure do |config|
      config.login     = "john"
      config.password  = "secret"
      config.subdomain = "john"
    end
  end

  it "returns customers list" do
    FakeWeb.register_uri(:get, "https://john:secret@john.centrumfaktur.pl/api/1.0/customers/", :response => fixture("customers.txt"))
    response = CentrumFaktur::Customer.list
    expected = [{"name"=>"Stefan Stefański", "contact"=>"", "address"=>"Stefanowo\r\nul. Stefańska 1", "resource_uri"=>"/api/1.0/customers/3138/", "email"=>"w.wnetrzak+stefan@gmail.com", "tax_id"=>""}]

    assert_equal expected, response
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
centrum_faktur-0.2.2 test/customer_test.rb
centrum_faktur-0.2.1 test/customer_test.rb