Sha256: 57c80bf58fbfe24c8566316ff0ec40998f41a257571560a24f9898c2bc1803ae

Contents?: true

Size: 485 Bytes

Versions: 3

Compression:

Stored size: 485 Bytes

Contents

require 'spec_helper'

describe Spree::Order do

  let(:order){Spree::Order.new}

  it 'should validate presence of tc_accepted' do
    order.valid_terms_and_conditions?.should be_false
    order.errors[:terms_and_conditions].should == ["must be accepted"]
  end

  it 'should be valid if terms and conditions are accepted' do
    order.terms_and_conditions = true
    order.valid_terms_and_conditions?.should be_true
    order.errors[:terms_and_conditions].should be_empty
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_terms_and_conditions-2.1.5 spec/models/order_spec.rb
spree_terms_and_conditions-2.1.4 spec/models/order_spec.rb
spree_terms_and_conditions-2.1.3 spec/models/order_spec.rb