2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-04-19 10:09:54 +00:00
|
|
|
require 'rails_helper'
|
2021-08-16 06:49:32 +00:00
|
|
|
require 'lib/auth/backend/backend_examples'
|
2017-04-19 10:09:54 +00:00
|
|
|
|
2021-08-16 06:49:32 +00:00
|
|
|
RSpec.describe Auth::Backend::Base do
|
2017-04-19 10:09:54 +00:00
|
|
|
|
|
|
|
let(:user) { create(:user) }
|
2021-08-16 06:49:32 +00:00
|
|
|
let(:auth) { Auth.new(user.login, 'not_used') }
|
|
|
|
let(:instance) { described_class.new({ adapter: described_class.name }, auth) }
|
2017-04-19 10:09:54 +00:00
|
|
|
|
2020-02-18 19:51:31 +00:00
|
|
|
describe '#valid?' do
|
2017-04-19 10:09:54 +00:00
|
|
|
it_behaves_like 'Auth backend'
|
|
|
|
end
|
|
|
|
end
|