14 lines
469 B
Ruby
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
|