Sha256: 4a9b09c9886e3af8cd6e365135913590a223bc5853cf7572d3bfe5e497e2eaa1

Contents?: true

Size: 500 Bytes

Versions: 9

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

RSpec.describe Post, type: :model do
  include ActiveJob::TestHelper

  let(:post) { build(:post) }

  context "when saved as new record" do
    it { expect { post.save! }.to have_enqueued_job(Rao::Service::Job) }
    it { expect { perform_enqueued_jobs { post.save! } }.to change { Cmor::Seo::Item.count }.from(0).to(1) }
    it { expect { perform_enqueued_jobs { post.save! } }.to change { Cmor::Seo::MetaTag.count }.from(0).to(3) }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cmor_seo-0.0.51.pre spec/models/post_spec.rb
cmor_seo-0.0.50.pre spec/models/post_spec.rb
cmor_seo-0.0.49.pre spec/models/post_spec.rb
cmor_seo-0.0.48.pre spec/models/post_spec.rb
cmor_seo-0.0.45.pre spec/models/post_spec.rb
cmor_seo-0.0.44.pre spec/models/post_spec.rb
cmor_seo-0.0.43.pre spec/models/post_spec.rb
cmor_seo-0.0.42.pre spec/models/post_spec.rb
cmor_seo-0.0.41.pre spec/models/post_spec.rb