Sha256: d44d7714b1dfde6a378e88c8d89cf4a9118a51023638775f781ad82373bf9039

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

require 'box/api'

describe Box::Api do
  it "fails without api key" do
    lambda { Box::Api.new('').get_ticket }.should raise_error
  end

  it "fails with invalid api key" do
    lambda { Box::Api.new('invalidapikey').get_ticket }.should raise_error
  end

  it "fails with invalid url" do
    lambda { Box::Api.new('invalidapikey', 'http://google.com').get_ticket }.should raise_error
  end

  it "fails with invalid version" do
    lambda { Box::Api.new('invalidapikey', 'https://box.net', 'https://upload.box.net', '3.14').get_ticket }.should raise_error
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
box-api-0.2.2 spec/api_spec.rb
box-api-0.2.1 spec/api_spec.rb
box-api-0.2.0 spec/api_spec.rb
box-api-0.1.9 spec/api_spec.rb
box-api-0.1.8 spec/api_spec.rb
box-api-0.1.7 spec/api_spec.rb
box-api-0.1.6 spec/api_spec.rb