diff --git a/test/js/resources/when-repositories-update-policy.xml b/test/js/resources/when-repositories-update-policy.xml
new file mode 100644
index 00000000..e42a082d
--- /dev/null
+++ b/test/js/resources/when-repositories-update-policy.xml
@@ -0,0 +1,38 @@
+
+
+
+ github
+
+
+
+
+ github
+
+
+ foo
+ foo
+ http://foo.bar
+
+ true
+ always
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/js/update-repositories.js b/test/js/update-repositories.js
index ad9a42ea..01b5e182 100644
--- a/test/js/update-repositories.js
+++ b/test/js/update-repositories.js
@@ -63,5 +63,24 @@ describe('validate repositories', function () {
});
});
+ describe('when configuring updatePolicy on repositories', function () {
+ it(' should be appended with ', function () {
+ // given input
+ process.env['INPUT_REPOSITORIES'] = '[{ "id": "foo", "name": "foo", "url": "http://foo.bar", "releases": { "enabled": "true", "updatePolicy": "always" }, "snapshots": { "enabled": "true" } }]';
+
+ // when
+ var actualXml = settings.getSettingsTemplate();
+ settings.update(actualXml);
+ var actual = settings.formatSettings(actualXml);
+
+ // then
+ var expectedXml = settings.getTemplate('../test/js/resources/', 'when-repositories-update-policy.xml');
+ expected = settings.formatSettings(expectedXml);
+ assert.equal(actual, expected);
+
+ process.env['INPUT_REPOSITORIES'] = '';
+ });
+ });
+
});