File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
google/cloud/storage/internal/rest Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ using ::testing::ElementsAre;
4040using ::testing::Eq;
4141using ::testing::HasSubstr;
4242using ::testing::Matcher;
43+ using ::testing::Not;
4344using ::testing::Pair;
4445using ::testing::ResultOf;
4546using ::testing::Return;
@@ -216,17 +217,12 @@ TEST(RestStubTest, ListBucketsOmitsPageTokenWhenEmptyInRequest) {
216217 auto mock = std::make_shared<MockRestClient>();
217218 ListBucketsRequest request (" test-project-id" );
218219
219- EXPECT_CALL (*mock, Get (ExpectedContext (),
220- ResultOf (
221- " request parameters do not contain 'pageToken'" ,
222- [](RestRequest const & r) {
223- return std::none_of (
224- r.parameters ().begin (), r.parameters ().end (),
225- [](auto const & param) {
226- return param.first == " pageToken" ;
227- });
228- },
229- ::testing::IsTrue ())))
220+ EXPECT_CALL (*mock,
221+ Get (ExpectedContext (),
222+ ResultOf (
223+ " request parameters do not contain 'pageToken'" ,
224+ [](RestRequest const & r) { return r.parameters (); },
225+ Not (Contains (Pair (" pageToken" , _))))))
230226 .WillOnce (Return (PermanentError ()));
231227
232228 auto tested = std::make_unique<RestStub>(Options{}, mock, mock);
You can’t perform that action at this time.
0 commit comments