mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
15 lines
385 B
Ruby
15 lines
385 B
Ruby
require 'spec_helper'
|
|
|
|
describe DirectoryItem do
|
|
context 'refresh' do
|
|
let!(:post) { Fabricate(:post) }
|
|
|
|
it "creates the record for the user" do
|
|
DirectoryItem.refresh!
|
|
expect(DirectoryItem.where(period_type: DirectoryItem.period_types[:all])
|
|
.where(user_id: post.user.id)
|
|
.exists?).to be_true
|
|
end
|
|
|
|
end
|
|
end
|