Sha256: 8416dd68151073635c40cf494097fd0442162c60fa91f38d33fee87af79dd45e
Contents?: true
Size: 660 Bytes
Versions: 1
Compression:
Stored size: 660 Bytes
Contents
# frozen_string_literal: true require 'test_plugin_helper' class VaultConnectionTest < ActiveSupport::TestCase subject { FactoryBot.create(:vault_connection, :without_callbacks) } should validate_presence_of(:name) should validate_uniqueness_of(:name) should validate_presence_of(:token) should validate_presence_of(:url) should allow_value('http://127.0.0.1:8200').for(:url) should_not allow_value('börks').for(:url) test 'validate that the name cannot be changed' do assert_raises(ActiveRecord::RecordInvalid, 'Validation failed: Name cannot be changed after creation') do subject.update!(name: 'UpdatedName') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman_vault-1.2.0 | test/models/vault_connection_test.rb |