Sha256: eb74cf084057677dd34e2445b9cd7f8bee2bfbf5ca3e604e4927a53c853c15ab

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe '.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

2 entries across 2 versions & 1 rubygems

Version Path
idy-0.1.3 spec/lib/idy/extension/options_spec.rb
idy-0.1.2 spec/lib/idy/extension/options_spec.rb