rating/spec/models/extension/rated_records_spec.rb

12 lines
327 B
Ruby
Raw Normal View History

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, '.rated_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 author gave' do
expect(author_1.rated_records).to match_array [rate_1, rate_2, rate_3, rate_5]
2017-11-02 18:55:46 +00:00
end
end