Files
redux-scraper/spec/models/domain/e621/post_spec.rb
2024-12-25 21:53:47 +00:00

14 lines
469 B
Ruby

require "rails_helper"
describe Domain::E621::Post do
it "ensures indexed_post is created" do
post = SpecUtil.build_e621_post(created_at: 1.day.ago)
post.save!
expect(post.indexed_post).to be_present
expect(post.indexed_post.created_at).to eq(post.created_at)
expect(post.indexed_post.postable_id).to eq(post.id)
expect(post.indexed_post.postable_type).to eq("Domain::E621::Post")
expect(post.indexed_post.postable).to eq(post)
end
end