Sha256: 9b44d7a0eef8d9ecf4027620dc14ab9001f6c52bd3d0652b7b99f1d5980249eb

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

#
# Copyright (c) 2013 figo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

require "flt"
require "minitest/autorun"
require "minitest/reporters"
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
require_relative "../lib/figo"
require "yaml"

class FigoTest < MiniTest::Unit::TestCase
  CONFIG = YAML.load_file(File.join(__dir__, 'config.yml'))

  def setup
    @sut = Figo::Session.new(CONFIG["ACCESS_TOKEN"])
  end

  def test_missing_handling
    assert_nil @sut.get_account "A1.42"
  end

  def test_error_handling
    assert_raises(Figo::Error) { @sut.sync_url "http://localhost:3003/", "" }
  end

  def test_sync_uri
    @sut.sync_url("http://example.com", "qew")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
figo-1.4.2 test/test_figo.rb