discourse/spec/models/category_featured_user_spec.rb
Luciano Sousa b3d769ff4f Update rspec syntax to v3
update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
2015-01-05 11:59:30 -03:00

25 lines
513 B
Ruby

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