Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 6f432ce

Browse files
authored
configuration: fix behat test for multimedia upload header type (#1782)
1 parent 4329582 commit 6f432ce

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

module/multimedia/features/multimedia-relation.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Feature: Multimedia relations
44

55
Background:
66
Given I am Authenticated as "test@ergonode.com"
7-
And I add "Content-Type" header equal to "multipart/form-data"
7+
And I add "Content-Type" header equal to "application/json"
88
And I add "Accept" header equal to "application/json"
99

1010
Scenario: Upload new multimedia file
11+
And I add "Content-Type" header equal to "multipart/form-data"
1112
When I send a POST request to "/api/v1/multimedia/upload" with params:
1213
| key | value |
1314
| upload | @multimedia-test-image.png |

module/multimedia/features/multimedia.feature

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Feature: Multimedia
44

55
Background:
66
Given I am Authenticated as "test@ergonode.com"
7-
And I add "Content-Type" header equal to "multipart/form-data"
7+
And I add "Content-Type" header equal to "application/json"
88
And I add "Accept" header equal to "application/json"
99

1010
Scenario: Upload new multimedia file
11+
And I add "Content-Type" header equal to "multipart/form-data"
1112
When I send a POST request to "/api/v1/multimedia/upload" with params:
1213
| key | value |
1314
| upload | @multimedia-test-image.png |
@@ -16,22 +17,26 @@ Feature: Multimedia
1617
And store response param "id" as "multimedia_id_1"
1718

1819
Scenario: Upload same multimedia file again
20+
And I add "Content-Type" header equal to "multipart/form-data"
1921
When I send a POST request to "/api/v1/multimedia/upload" with params:
2022
| key | value |
2123
| upload | @multimedia-test-image.png |
2224
Then the response status code should be 400
2325

2426
Scenario: Upload new multimedia file with unsupported extension
27+
And I add "Content-Type" header equal to "multipart/form-data"
2528
When I send a POST request to "/api/v1/multimedia/upload" with params:
2629
| key | value |
2730
| upload | @multimedia-test-image.abc |
2831
Then the response status code should be 400
2932

3033
Scenario: Upload new multimedia file without uploaded file
34+
And I add "Content-Type" header equal to "multipart/form-data"
3135
When I send a POST request to "/api/v1/multimedia/upload"
3236
Then the response status code should be 400
3337

3438
Scenario: Upload new multimedia with empty file
39+
And I add "Content-Type" header equal to "multipart/form-data"
3540
When I send a POST request to "/api/v1/multimedia/upload" with params:
3641
| key | value |
3742
| upload | @multimedia-test-empty-image.png |
@@ -75,6 +80,7 @@ Feature: Multimedia
7580
| mime | image/png |
7681

7782
Scenario: Upload second multimedia file (same file different name)
83+
And I add "Content-Type" header equal to "multipart/form-data"
7884
When I send a POST request to "/api/v1/multimedia/upload" with params:
7985
| key | value |
8086
| upload | @multimedia-test-image.png |

0 commit comments

Comments
 (0)