fix: certificate

This commit is contained in:
Shivam Mishra
2025-08-25 14:29:30 +05:30
parent 99ab1eadb5
commit 7a33065efe
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ FactoryBot.define do
cert.subject = OpenSSL::X509::Name.parse('/C=US/ST=Test/L=Test/O=Test/CN=test.example.com')
cert.issuer = cert.subject
cert.public_key = key.public_key
cert.not_before = Time.now
cert.not_before = Time.zone.now
cert.not_after = cert.not_before + (365 * 24 * 60 * 60)
cert.sign(key, OpenSSL::Digest.new('SHA256'))
cert.to_pem
+3 -3
View File
@@ -59,7 +59,7 @@ RSpec.describe AccountSamlSettings, type: :model do
cert.subject = OpenSSL::X509::Name.parse('/C=US/ST=Test/L=Test/O=Test/CN=different.example.com')
cert.issuer = cert.subject
cert.public_key = key.public_key
cert.not_before = Time.now
cert.not_before = Time.zone.now
cert.not_after = cert.not_before + (365 * 24 * 60 * 60)
cert.sign(key, OpenSSL::Digest.new('SHA256'))
new_cert = cert.to_pem
@@ -152,8 +152,8 @@ RSpec.describe AccountSamlSettings, type: :model do
enabled_setting = create(:account_saml_settings, :enabled, account: account)
disabled_setting = create(:account_saml_settings, enabled: false)
expect(AccountSamlSettings.enabled).to include(enabled_setting)
expect(AccountSamlSettings.enabled).not_to include(disabled_setting)
expect(described_class.enabled).to include(enabled_setting)
expect(described_class.enabled).not_to include(disabled_setting)
end
end
end