File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 282282 described_class . new ( [ '127.0.0.1:27017' ] , :platform => 'mongoid-6.0.2' )
283283 end
284284
285- it 'includes the odm name in the app metadata' do
285+ it 'includes the platform info in the app metadata' do
286286 expect ( app_metadata . send ( :full_client_document ) [ :platform ] ) . to match ( /mongoid-6\. 0\. 2/ )
287287 end
288288 end
289+
290+ context 'when platform details are not specified' do
291+
292+ let ( :app_metadata ) do
293+ client . cluster . app_metadata
294+ end
295+
296+ let ( :client ) do
297+ described_class . new ( [ '127.0.0.1:27017' ] )
298+ end
299+
300+ let ( :platform_string ) do
301+ [
302+ RUBY_VERSION ,
303+ RUBY_PLATFORM ,
304+ RbConfig ::CONFIG [ 'build' ]
305+ ] . join ( ', ' )
306+ end
307+
308+ it 'does not include the platform info in the app metadata' do
309+ expect ( app_metadata . send ( :full_client_document ) [ :platform ] ) . to eq ( platform_string )
310+ end
311+ end
289312 end
290313
291314 context 'when providing a connection string' do
You can’t perform that action at this time.
0 commit comments