Sha256: 04ccd040feeb92192a23ef21c8edc295f6902884a982856f96034c2916ec00cf

Contents?: true

Size: 390 Bytes

Versions: 7

Compression:

Stored size: 390 Bytes

Contents

require 'spec_helper'

describe OrderItem do
  describe 'schema' do
    it { expect(subject).to have_db_column(:order_id).of_type(:integer) }
    it { expect(subject).to have_db_column(:product_id).of_type(:integer) }
    it { expect(subject).to have_db_column(:product_title).of_type(:string) }
  end

  describe 'associations' do
    it { expect(subject).to belong_to(:order) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
power_shop-0.2.4 spec/models/order_item_spec.rb
power_shop-0.2.3 spec/models/order_item_spec.rb
power_shop-0.2.2 spec/models/order_item_spec.rb
power_shop-0.2.1 spec/models/order_item_spec.rb
power_shop-0.2.0 spec/models/order_item_spec.rb
power_shop-0.1.1 spec/models/order_item_spec.rb
power_shop-0.1.0 spec/models/order_item_spec.rb