Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20221008032350_add_password_expiration_migration_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 05e557f1f52313b76104b2a331e049d99f7f1cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

require_migration!

RSpec.describe AddPasswordExpirationMigration do
  let(:application_setting) { table(:application_settings).create! }

  describe "#up" do
    it 'allows to read password expiration fields' do
      migrate!

      expect(application_setting.password_expiration_enabled).to eq false
      expect(application_setting.password_expires_in_days).to eq 90
      expect(application_setting.password_expires_notice_before_days).to eq 7
    end
  end
end