expectBuild captures a call to InsertWorkspaceBuild and runs the provided assertions against it.
( assertions func(job database.InsertWorkspaceBuildParams), )
| 1558 | // expectBuild captures a call to InsertWorkspaceBuild and runs the provided assertions |
| 1559 | // against it. |
| 1560 | func expectBuild( |
| 1561 | assertions func(job database.InsertWorkspaceBuildParams), |
| 1562 | ) func(mTx *dbmock.MockStore) { |
| 1563 | return func(mTx *dbmock.MockStore) { |
| 1564 | mTx.EXPECT().InsertWorkspaceBuild(gomock.Any(), gomock.Any()). |
| 1565 | Times(1). |
| 1566 | DoAndReturn( |
| 1567 | func(ctx context.Context, params database.InsertWorkspaceBuildParams) error { |
| 1568 | assertions(params) |
| 1569 | return nil |
| 1570 | }, |
| 1571 | ) |
| 1572 | } |
| 1573 | } |
| 1574 | |
| 1575 | // expectBuildParameters captures a call to InsertWorkspaceBuildParameters and runs the provided assertions |
| 1576 | // against it. |
no test coverage detected