2017-11-02 18:55:46 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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, '.rates_records' 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 rates that this resource received' do
|
|
|
|
expect(article_1.rates_records).to match_array [rate_1, rate_4, rate_5, rate_6]
|
|
|
|
end
|
|
|
|
end
|