Sha256: 1e92db6910123097ec750361b6ad90cd718d884e10b6fddc6e6482d918777c00

Contents?: true

Size: 852 Bytes

Versions: 4

Compression:

Stored size: 852 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

module MeducationSDK
  class ConfigurationTest < Minitest::Test

    def setup
      super
      MeducationSDK.instance_variable_set("@config", nil)
    end

    def test_obtaining_singletion
      refute MeducationSDK.config.nil?
    end

    def test_block_syntax
      test_key = "foobar-123-access"
      MeducationSDK.config do |config|
        config.access_id = test_key
      end
      assert_equal test_key, Loquor.config.access_id
    end

    def test_endpoint_is_set_correctly
      Configuration.new
      assert_equal "http://www.meducation.net/system", Loquor.config.endpoint
    end

    def test_access_id_proxies_to_loquor
      access_id = "test-access-key"
      MeducationSDK.config.access_id = access_id
      assert_equal access_id, Loquor.config.access_id
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
meducation_sdk-0.3.3 test/configuration_test.rb
meducation_sdk-0.3.2 test/configuration_test.rb
meducation_sdk-0.3.1 test/configuration_test.rb
meducation_sdk-0.3.0 test/configuration_test.rb