Sha256: c5f45177738c151f00cc77543b9b97bbb5df22e6e24f068b1c12e38b21a5ca16
Contents?: true
Size: 654 Bytes
Versions: 2
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe Thing, type: :model do describe 'Mixin functioning' do it { should have_many(:works_cited_citations) } end describe 'WorksCited Methods' do describe '#works_cited_citations_attributes=' do let!(:thing) { FactoryBot.create(:thing) } it 'saves the citations' do expect do citation_attributes = FactoryBot.build(:works_cited_citation).attributes thing.works_cited_citations_attributes = { "0" => citation_attributes } thing.save end.to change { thing.works_cited_citations.count }.by(1) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
works_cited-0.1.16 | spec/models/thing_spec.rb |
works_cited-0.1.15 | spec/models/thing_spec.rb |