This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/spec/models/category_featured_user_spec.rb
2013-02-26 07:31:35 +03:00

27 lines
493 B
Ruby

require 'spec_helper'
describe CategoryFeaturedUser do
it { should belong_to :category }
it { should belong_to :user }
context 'featuring users' do
before do
@category = Fabricate(:category)
CategoryFeaturedUser.feature_users_in(@category)
end
it 'has a featured user' do
CategoryFeaturedUser.count.should_not == 0
end
it 'returns the user via the category association' do
@category.featured_users.should be_present
end
end
end