summaryrefslogtreecommitdiff
path: root/spec/models/concerns/token_authenticatable_strategies/digest_spec.rb
blob: bcd6e1e73160bee99b2e3c2c8eb380ea284c008c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe TokenAuthenticatableStrategies::Digest do
  let(:model) { class_double('Project') }
  let(:options) { { digest: true } }

  subject(:strategy) do
    described_class.new(model, 'some_field', options)
  end

  describe '#token_fields' do
    it 'includes the digest field' do
      expect(strategy.token_fields).to contain_exactly('some_field', 'some_field_digest')
    end
  end
end