Sha256: 58186318c2ee85af6c9d487a9a954aae4024e50e6589fcaf1353db883eceffa0

Contents?: true

Size: 373 Bytes

Versions: 7

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Ingredient, type: :model do
  describe 'Relationships' do
    it { should have_many(:uses) }

    it { should have_many(:recipe_uses) }
    it { should have_many(:recipes).through(:uses) }

    it { should_not have_many(:how_to_uses) }
    it { should_not have_many(:how_tos).through(:uses) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cookbook-0.1.6 spec/models/ingredient_spec.rb
cookbook-0.1.5 spec/models/ingredient_spec.rb
cookbook-0.1.4 spec/models/ingredient_spec.rb
cookbook-0.1.3 spec/models/ingredient_spec.rb
cookbook-0.1.2 spec/models/ingredient_spec.rb
cookbook-0.1.1 spec/models/ingredient_spec.rb
cookbook-0.1.0 spec/models/ingredient_spec.rb