Sha256: 841889ce302ad00827771fd09edaa80826aa088504640780a22ed1fa6f1a8906

Contents?: true

Size: 914 Bytes

Versions: 10

Compression:

Stored size: 914 Bytes

Contents

require 'spec_helper'

describe Sisow::Configuration do

  before :each do
    @configuration = Sisow::Configuration.new
    @configuration.merchant_id  = '123'
    @configuration.merchant_key = 'abc'
    @configuration.shop_id      = '999'
    @configuration.debug_mode   = false
    @configuration.test_mode    = false
  end

  it "should tell wether test mode is enabled" do
    @configuration.test_mode = true
    @configuration.test_mode_enabled?.should == true
  end

  it "should tell wether debug mode is enabled" do
    @configuration.debug_mode = true
    @configuration.debug_mode_enabled?.should == true
  end

  it "should always save merchant_key as string" do
    @configuration.merchant_key = 123
    @configuration.merchant_key.should == '123'
  end

  it "should always save merchant_id as string" do
    @configuration.merchant_id = 123
    @configuration.merchant_id.should == '123'
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sisow-2.1 spec/models/configuration_spec.rb
sisow-2.0 spec/models/configuration_spec.rb
sisow-1.7 spec/models/configuration_spec.rb
sisow-1.6 spec/models/configuration_spec.rb
sisow-1.5 spec/models/configuration_spec.rb
sisow-1.4 spec/models/configuration_spec.rb
sisow-1.3 spec/models/configuration_spec.rb
sisow-1.2 spec/models/configuration_spec.rb
sisow-1.1.1 spec/models/configuration_spec.rb
sisow-1.1.0 spec/models/configuration_spec.rb