2017-11-02 18:55:46 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'rails_helper'
|
2018-01-16 03:25:36 +00:00
|
|
|
require 'support/shared_context/with_database_records'
|
2017-11-02 18:55:46 +00:00
|
|
|
|
|
|
|
RSpec.describe Rating::Extension, '.rating' do
|
2018-01-16 03:25:36 +00:00
|
|
|
include_context 'with_database_records'
|
2017-11-02 18:55:46 +00:00
|
|
|
|
|
|
|
it 'returns all rating of this resource' do
|
|
|
|
expect(article_1.rating_records).to match_array Rating::Rating.where(resource: article_1)
|
|
|
|
end
|
|
|
|
end
|