summaryrefslogtreecommitdiff
path: root/tests/spec/validator_spec.rb
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-04 20:09:34 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-04 20:09:34 -0600
commited351160f94bfff12fadbceb44a2f85604dfb957 (patch)
treeafd2d3300614a6b215af4d0b42f2496906e72a3a /tests/spec/validator_spec.rb
parent54b7f93e105f97f35e7cfe0587f04c100cb53f57 (diff)
downloadhorizon-ed351160f94bfff12fadbceb44a2f85604dfb957.tar.gz
horizon-ed351160f94bfff12fadbceb44a2f85604dfb957.tar.bz2
horizon-ed351160f94bfff12fadbceb44a2f85604dfb957.tar.xz
horizon-ed351160f94bfff12fadbceb44a2f85604dfb957.zip
tests: More validity tests for keymap and language
Diffstat (limited to 'tests/spec/validator_spec.rb')
-rw-r--r--tests/spec/validator_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb
index a9c5fd9..e950a97 100644
--- a/tests/spec/validator_spec.rb
+++ b/tests/spec/validator_spec.rb
@@ -197,6 +197,11 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
run_validate
expect(last_command_started).to have_output(/error: .*language.*codeset/)
end
+ it "requires a valid two-char language" do
+ use_fixture '0199-language-invalid2.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*language.*invalid/)
+ end
end
context "for 'nameserver' key" do
it "succeeds with IPv4 and IPv6 addresses" do
@@ -964,6 +969,11 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do
expect(last_command_started).to have_output(PARSER_SUCCESS)
expect(last_command_started).to have_output(VALIDATOR_SUCCESS)
end
+ it "fails with an invalid value" do
+ use_fixture '0198-keymap-invalid.installfile'
+ run_validate
+ expect(last_command_started).to have_output(/error: .*keymap.*invalid/)
+ end
end
end
context "unique keys" do