Sha256: 223ff3cb1f84b77129e9ea9c30076e9e75b886791692f561f20cbcce3a3e3d83
Contents?: true
Size: 523 Bytes
Versions: 1
Compression:
Stored size: 523 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe Rating::Extension, ':after_create' do context 'when creates object' do let!(:user) { create :user } it 'creates a record with zero values just to be easy to make the count' do rating = Rating::Rating.find_by(resource: user) expect(rating.average).to eq 0 expect(rating.estimate).to eq 0 expect(rating.resource).to eq user expect(rating.sum).to eq 0 expect(rating.total).to eq 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rating-0.1.0 | spec/models/extension/after_create_spec.rb |