Sha256: 84ad12ad21d6845dc1d28b35e81f437f952a581c334ac047b7183889c2054f4b
Contents?: true
Size: 815 Bytes
Versions: 2
Compression:
Stored size: 815 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe Rating::Config, '.validations' do context 'when rating.yml does not exist' do it do expect(subject.validations).to eq({ rate: { case_sensitive: false, scope: %w[author_type resource_id resource_type scopeable_id scopeable_type] } }.deep_stringify_keys) end end if ENV['CONFIG_ENABLED_WITH_EXTRA_SCOPES'] != 'true' context 'when rating.yml exists' do it do expect(subject.validations).to eq({ rate: { case_sensitive: false, scope: %w[author_type resource_id resource_type scopeable_id scopeable_type scope_1 scope_2] } }.deep_stringify_keys) end end if ENV['CONFIG_ENABLED_WITH_EXTRA_SCOPES'] == 'true' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rating-0.8.0 | spec/config/validations_spec.rb |
rating-0.7.0 | spec/config/validations_spec.rb |