mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
fix: check brand:touchIcon for correct path
This commit is contained in:
@@ -6,8 +6,8 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
|
||||
const request = require('../src/request');
|
||||
const db = require('./mocks/databasemock');
|
||||
const request = require('../src/request');
|
||||
const api = require('../src/api');
|
||||
const categories = require('../src/categories');
|
||||
const topics = require('../src/topics');
|
||||
@@ -692,6 +692,16 @@ describe('Controllers', () => {
|
||||
assert(body);
|
||||
});
|
||||
|
||||
it('should 404 if brand:touchIcon is not valid', async () => {
|
||||
const oldValue = meta.config['brand:touchIcon'];
|
||||
meta.config['brand:touchIcon'] = '../../not/valid';
|
||||
|
||||
const { response, body } = await request.get(`${nconf.get('url')}/apple-touch-icon`);
|
||||
assert.strictEqual(response.statusCode, 404);
|
||||
assert.strictEqual(body, 'Not found');
|
||||
meta.config['brand:touchIcon'] = oldValue;
|
||||
})
|
||||
|
||||
|
||||
it('should error if guests do not have search privilege', async () => {
|
||||
const { response, body } = await request.get(`${nconf.get('url')}/api/users?query=bar§ion=sort-posts`);
|
||||
|
||||
Reference in New Issue
Block a user