Sha256: f107d0fce682c05b7519426b8d1f1b87fa30264ed8b033e4b63f705223567910
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe Spree::Calculator::Shipping::CorreiosBaseCalculator do before { @calculator = Spree::Calculator::Shipping::CorreiosBaseCalculator.new } it 'should have preferences' do preferences = [:token, :password, :additional_days, :additional_value, :declared_value, :receipt_notification, :receive_in_hands] expect(@calculator.preferences.keys).to eq(preferences) end it 'declared value should default to false' do expect(@calculator.preferred_declared_value).to eq(false) end it 'receipt notification should default to false' do expect(@calculator.preferred_receipt_notification).to eq(false) end it 'receive in hands should default to false' do expect(@calculator.preferred_receive_in_hands).to eq(false) end it 'should have a contract if both token and password are given' do expect(@calculator).not_to have_contract @calculator.preferred_token = 'some token' @calculator.preferred_password = 'some password' expect(@calculator).to have_contract end end
Version data entries
4 entries across 4 versions & 1 rubygems