You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function testOnlyUserWithOfferCanConfirmOrder() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
140
+
function testOnlyUserWithOfferCanConfirmOrder() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
135
141
// Arrange
136
142
uint64 offerId =1;
137
143
// Act / Assert
@@ -141,12 +147,13 @@ contract OrderContractTest is Test {
141
147
142
148
}
143
149
144
-
function testConfirmOrderUpdatesAmountPaidAndTimeStamp() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
150
+
function testConfirmOrderUpdatesAmountPaidAndTimeStamp() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
function testConfirmOrderEmitsEvent() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))){
168
+
function testConfirmOrderEmitsEvent() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))){
162
169
// Arrange
163
170
uint64 offerId =1;
164
171
uint256 priceForOffer =5ether;
@@ -188,41 +195,41 @@ contract OrderContractTest is Test {
188
195
// proposeOrderAnswer tests //
189
196
//////////////////////////////////////
190
197
191
-
function testOnlyControllerCanProposeAnswer() public proposeOrderForUser {
192
-
uint256 priceForOffer =5ether;
198
+
function testOnlySellerCanProposeAnswer() public proposeOrderForUser {
@@ -303,7 +312,7 @@ contract OrderContractTest is Test {
303
312
assertEq(controller, expectedController);
304
313
}
305
314
306
-
function testGetOrderIDsByMerchant() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
315
+
function testGetOrderIDsByMerchant() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
307
316
// Arrange
308
317
uint64 offerId =1;
309
318
// Act
@@ -313,7 +322,7 @@ contract OrderContractTest is Test {
313
322
assertEq(orderIds[0], offerId);
314
323
}
315
324
316
-
function testGetMerchantOrderDetailsRevertsIfNotMerchant() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
325
+
function testGetMerchantOrderDetailsRevertsIfNotMerchant() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
317
326
// Arrange
318
327
uint64 offerId =1;
319
328
// Act / Assert
@@ -322,7 +331,7 @@ contract OrderContractTest is Test {
function testGetMerchantOrderDetails() public proposeOrderForUser orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
334
+
function testGetMerchantOrderDetails() public proposeOrderForUser merchantSetForOrder(1, SELLER) orderProposedAnsweredByAgent(1, keccak256(abi.encodePacked("Test Answer"))) {
0 commit comments