This repository was archived by the owner on Jun 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spec/unit/models/services Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ def new_model
470470 expect ( binding . last_operation . state ) . to eq 'in progress'
471471 expect ( binding . last_operation . description ) . to eq '10%'
472472 expect ( binding . last_operation . type ) . to eq 'create'
473- expect ( ServiceBinding . count ) . to eq ( 1 )
473+ expect ( ServiceBinding . where ( guid : binding . guid ) . count ) . to eq ( 1 )
474474 end
475475
476476 context 'when saving the binding operation fails' do
@@ -480,7 +480,7 @@ def new_model
480480
481481 it 'should rollback the binding' do
482482 expect { binding . save_with_new_operation ( { state : 'will fail' } ) } . to raise_error ( Sequel ::DatabaseError )
483- expect ( ServiceBinding . count ) . to eq ( 0 )
483+ expect ( ServiceBinding . where ( guid : binding . guid ) . count ) . to eq ( 0 )
484484 end
485485 end
486486
@@ -492,8 +492,8 @@ def new_model
492492 expect ( binding . last_operation . state ) . to eq 'in progress'
493493 expect ( binding . last_operation . type ) . to eq 'delete'
494494 expect ( binding . last_operation . description ) . to eq nil
495- expect ( ServiceBinding . count ) . to eq ( 1 )
496- expect ( ServiceBindingOperation . count ) . to eq ( 1 )
495+ expect ( ServiceBinding . where ( guid : binding . guid ) . count ) . to eq ( 1 )
496+ expect ( ServiceBindingOperation . where ( service_binding_id : binding . id ) . count ) . to eq ( 1 )
497497 end
498498 end
499499
You can’t perform that action at this time.
0 commit comments