diff --git a/test/unit/train_test.rb b/test/unit/train_test.rb index e3b639eb..d07dad8b 100644 --- a/test/unit/train_test.rb +++ b/test/unit/train_test.rb @@ -9,20 +9,20 @@ Train::Plugins.registry.clear end - let(:default_options) { + let(:default_audit_log_options) { { enable_audit_log: { default: false, }, audit_log_location: { - default: nil, required: true, + default: nil, }, audit_log_app_name: { default: "train", }, audit_log_size: { - default: 2000000, + default: 2097152, }, audit_log_frequency: { default: "daily", @@ -69,9 +69,9 @@ _ { Train.options("missing") }.must_raise Train::PluginLoadError end - it "provides empty options of a transport plugin" do + it "provides list of default options of a transport plugin" do Class.new(Train.plugin 1) { name "none" } - _(Train.options("none")).must_equal({}) + _(Train.options("none")).must_equal(default_audit_log_options) end it "provides all options of a transport plugin" do @@ -79,12 +79,13 @@ name "one" option :one, required: true, default: 123 end - _(Train.options("one")).must_equal({ + output = { one: { required: true, default: 123, - }, - }) + } + }.merge(default_audit_log_options) + _(Train.options("one")).must_equal(output) end end