Sha256: 4516d4b9de8c6f5f27f592df424daf74b03cb29cbdc5827198196742d714e2a0

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Article, '.idy_options' do
  context 'when options is not given' do
    it 'returns a default options with a salt generated based on model name' do
      expect(Article.idy_options).to eq(salt: article_default_salt)
    end
  end

  context 'when salt is given' do
    it 'returns a default options with a salt equal the given one' do
      expect(Comment.idy_options).to eq(salt: 'salt')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
idy-1.0.0 spec/lib/idy/extension/options_spec.rb