Sha256: 86499c80c333502c1223395de2eea2c26db95ebfd40245edeb5ca5b3d43cb6e4

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

=begin
#SnapTrade

#Connect brokerage accounts to your app for live positions and trading

The version of the OpenAPI document: 1.0.0
Contact: api@snaptrade.com

=end

require 'spec_helper'

describe SnapTrade::Configuration do
  let(:config) { SnapTrade::Configuration.default }

  before(:each) do
    # uncomment below to setup host and base_path
    # require 'URI'
    # uri = URI.parse("https://api.snaptrade.com/api/v1")
    # SnapTrade.configure do |c|
    #   c.host = uri.host
    #   c.base_path = uri.path
    # end
  end

  describe '#base_url' do
    it 'should have the default value' do
      # uncomment below to test default value of the base path
      # expect(config.base_url).to eq("https://api.snaptrade.com/api/v1")
    end

    it 'should remove trailing slashes' do
      [nil, '', '/', '//'].each do |base_path|
        config.base_path = base_path
        # uncomment below to test trailing slashes
        # expect(config.base_url).to eq("https://api.snaptrade.com/api/v1")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snaptrade-1.16.2 spec/configuration_spec.rb
snaptrade-1.15.1 spec/configuration_spec.rb
snaptrade-1.13.0 spec/configuration_spec.rb
snaptrade-1.8.0 spec/configuration_spec.rb