blob: 48702e866e0133e7f514ddad6ae3d147d550cb9e (
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 CopyClickhouseConnectionStringToEncryptedVar, feature_category: :product_analytics_data_management do
let!(:migration) { described_class.new }
let(:setting) { table(:application_settings).create!(clickhouse_connection_string: 'https://example.com/test') }
it 'copies the clickhouse_connection_string to the encrypted column' do
expect(setting.clickhouse_connection_string).to eq('https://example.com/test')
migrate!
setting.reload
expect(setting.clickhouse_connection_string).to eq('https://example.com/test')
expect(setting.encrypted_product_analytics_clickhouse_connection_string).not_to be_nil
end
end
|