Sha256: 84d90fa12332642124a4b637251e3af7a820fc6b4c0d4a884ea82c6cbf91f731

Contents?: true

Size: 332 Bytes

Versions: 1

Compression:

Stored size: 332 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Rating::Extension, ':rate_for' do
  let!(:user)    { create :user }
  let!(:article) { create :article }

  it 'delegates to rate object' do
    expect(Rating::Rate).to receive(:rate_for).with author: user, resource: article

    user.rate_for article
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rating-0.1.0 spec/models/extension/rate_for_spec.rb