Release ForgeFlow 0.8.9 Git Validator

This commit is contained in:
NuklearRabbit
2026-07-26 05:24:22 +02:00
parent e888bd2c1c
commit 24dde9a031
17 changed files with 1106 additions and 22 deletions
+15
View File
@@ -126,3 +126,18 @@ test('downloads release assets through the release-scoped Gitea endpoint', async
/invalid release ID/,
);
});
test('creates conservative default branch protection rules', async () => {
const service = new GiteaService(makeStore());
let request = null;
service.request = async (pathname, options) => {
request = { pathname, options };
return { data: { rule_name: 'main' } };
};
const result = await service.createBranchProtection('jens', 'app', 'main');
assert.equal(result.rule_name, 'main');
assert.equal(request.options.method, 'POST');
assert.equal(request.options.body.enable_push, false);
assert.equal(request.options.body.enable_force_push, false);
assert.equal(request.options.body.rule_name, 'main');
});