diff options
Diffstat (limited to 'server/tests/api/search/search-channels.ts')
-rw-r--r-- | server/tests/api/search/search-channels.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/server/tests/api/search/search-channels.ts b/server/tests/api/search/search-channels.ts index ef78c0f67..4485c424e 100644 --- a/server/tests/api/search/search-channels.ts +++ b/server/tests/api/search/search-channels.ts | |||
@@ -122,18 +122,25 @@ describe('Test channels search', function () { | |||
122 | 122 | ||
123 | it('Should filter by names', async function () { | 123 | it('Should filter by names', async function () { |
124 | { | 124 | { |
125 | const body = await command.advancedChannelSearch({ search: { names: [ 'squall_channel', 'zell_channel' ] } }) | 125 | const body = await command.advancedChannelSearch({ search: { handles: [ 'squall_channel', 'zell_channel' ] } }) |
126 | expect(body.total).to.equal(2) | 126 | expect(body.total).to.equal(1) |
127 | expect(body.data).to.have.lengthOf(2) | 127 | expect(body.data).to.have.lengthOf(1) |
128 | expect(body.data[0].displayName).to.equal('Squall channel') | 128 | expect(body.data[0].displayName).to.equal('Squall channel') |
129 | expect(body.data[1].displayName).to.equal('Zell channel') | ||
130 | } | 129 | } |
131 | 130 | ||
132 | { | 131 | { |
133 | const body = await command.advancedChannelSearch({ search: { names: [ 'chocobozzz_channel' ] } }) | 132 | const body = await command.advancedChannelSearch({ search: { handles: [ 'chocobozzz_channel' ] } }) |
134 | expect(body.total).to.equal(0) | 133 | expect(body.total).to.equal(0) |
135 | expect(body.data).to.have.lengthOf(0) | 134 | expect(body.data).to.have.lengthOf(0) |
136 | } | 135 | } |
136 | |||
137 | { | ||
138 | const body = await command.advancedChannelSearch({ search: { handles: [ 'squall_channel', 'zell_channel@' + remoteServer.host ] } }) | ||
139 | expect(body.total).to.equal(2) | ||
140 | expect(body.data).to.have.lengthOf(2) | ||
141 | expect(body.data[0].displayName).to.equal('Squall channel') | ||
142 | expect(body.data[1].displayName).to.equal('Zell channel') | ||
143 | } | ||
137 | }) | 144 | }) |
138 | 145 | ||
139 | after(async function () { | 146 | after(async function () { |