discourse/spec/models/directory_item_spec.rb

16 lines
387 B
Ruby
Raw Normal View History

require 'spec_helper'
describe DirectoryItem do
context 'refresh' do
2015-03-20 13:24:03 -04:00
let!(:post) { Fabricate(:post) }
it "creates the record for the user" do
DirectoryItem.refresh!
expect(DirectoryItem.where(period_type: DirectoryItem.period_types[:all])
2015-03-20 13:24:03 -04:00
.where(user_id: post.user.id)
.exists?).to be_truthy
end
end
end