|
147 | 147 | it 'passes the session' do
|
148 | 148 | client.start_session do |session|
|
149 | 149 | event = Utils.get_command_event(client, 'explain') do |client|
|
150 |
| - client['foo'].find({}, session: session).explain.should have_key('queryPlanner') |
| 150 | + client['foo'].find({}, session: session).explain.should be_explain_output |
151 | 151 | end
|
152 | 152 | event.command.fetch('lsid').should == session.session_id
|
153 | 153 | end
|
|
159 | 159 |
|
160 | 160 | it 'passes the read preference' do
|
161 | 161 | event = Utils.get_command_event(client, 'explain') do |client|
|
162 |
| - client['foo'].find({}, read: {mode: :secondary_preferred}).explain.should have_key('queryPlanner') |
| 162 | + client['foo'].find({}, read: {mode: :secondary_preferred}).explain.should be_explain_output |
163 | 163 | end
|
164 | 164 | event.command.fetch('$readPreference').should == {'mode' => 'secondaryPreferred'}
|
165 | 165 | end
|
|
170 | 170 |
|
171 | 171 | it 'passes the read preference' do
|
172 | 172 | event = Utils.get_command_event(client, 'explain') do |client|
|
173 |
| - client['foo', read: {mode: :secondary_preferred}].find.explain.should have_key('queryPlanner') |
| 173 | + client['foo', read: {mode: :secondary_preferred}].find.explain.should be_explain_output |
174 | 174 | end
|
175 | 175 | event.command.fetch('$readPreference').should == {'mode' => 'secondaryPreferred'}
|
176 | 176 | end
|
|
183 | 183 |
|
184 | 184 | it 'passes the read preference' do
|
185 | 185 | event = Utils.get_command_event(client, 'explain') do |client|
|
186 |
| - client['foo'].find.explain.should have_key('queryPlanner') |
| 186 | + client['foo'].find.explain.should be_explain_output |
187 | 187 | end
|
188 | 188 | event.command.fetch('$readPreference').should == {'mode' => 'secondaryPreferred'}
|
189 | 189 | end
|
|
0 commit comments