           }
         }
         nock('https://api.pagerduty.com')
-        .get('/users?query=momo%40example.com')
+        .get('/users')
+        .query({
+          query: 'momo@example.com'
+        })
         .reply 200, require('./fixtures/users_list-match.json')
       afterEach ->
         room.robot.brain.data.pagerv2 = { }

          earliest: true
        })
        .reply(200, payload1)
        .get(
          '/oncalls?time_zone=UTC&schedule_ids%5B%5D=42&earliest=true' +
          '&since=' + encodeURIComponent(moment(@start_time).utc().add(2, 'minute').format()) +
          '&until=' + encodeURIComponent(moment(@start_time).utc().add(3, 'minute').format())
        )
        .reply(200, payload2)

      afterEach ->

          }
        }
        nock('https://api.pagerduty.com')
        .get('/users')
        .query({
          query: 'momo@example.com'
        })
        .reply(200, require('./fixtures/users_list-nomatch.json'))
      afterEach ->
        room.robot.brain.data.pagerv2 = { }
