mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 05:27:00 +03:00
add etag tests
- add shadowban self test - add init and -it to docker runs
This commit is contained in:
@@ -410,6 +410,27 @@ describe("shadowBanUser", () => {
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should be possible to ban self", (done) => {
|
||||
const userID = VIPuserID;
|
||||
const hashUserID = getHash(userID);
|
||||
client({
|
||||
method: "POST",
|
||||
url: endpoint,
|
||||
params: {
|
||||
enabled: true,
|
||||
userID: hashUserID,
|
||||
categories: `["sponsor"]`,
|
||||
unHideOldSubmissions: true,
|
||||
adminUserID: userID,
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
done();
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
|
||||
it("Should be able to ban user by userID and other users who used that IP and hide specific category", (done) => {
|
||||
const hashedIP = "shadowBannedIP8";
|
||||
const userID = "shadowBanned8";
|
||||
|
||||
Reference in New Issue
Block a user