Skip to content

Commit 0fe43ff

Browse files
committed
fix unit tests
1 parent 1678145 commit 0fe43ff

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

search-app/test/cmr/search/test/unit/api/association.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,22 @@
117117
{:errors ["Collection [C1200465592-PROV1] does not exist or is not visible."], :associated-item {:concept-id "C1200465592-PROV1"}})
118118
{:status 207
119119
:body "[{\"service_association\":{\"concept_id\":\"SA1200000003-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000001-PROV1\"},\"status\":200},{\"errors\":[\"Collection [C1200465592-PROV1] does not exist or is not visible.\"],\"associated_item\":{\"concept_id\":\"C1200465592-PROV1\"},\"status\":400}]"
120-
:headers {"Content-Type" mt/json}}
120+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
121121

122122
"status-code 200 is given, returns data"
123123
200
124124
'({:service-association {:concept-id "SA1200000003-CMR", :revision-id 1}, :associated-item {:concept-id "C1200000001-PROV1"}}
125125
{:service-association {:concept-id "SA1200000004-CMR", :revision-id 2}, :associated-item {:concept-id "C1200000001-PROV1"}})
126126
{:status 200
127127
:body "[{\"service_association\":{\"concept_id\":\"SA1200000003-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000001-PROV1\"}},{\"service_association\":{\"concept_id\":\"SA1200000004-CMR\",\"revision_id\":2},\"associated_item\":{\"concept_id\":\"C1200000001-PROV1\"}}]"
128-
:headers {"Content-Type" mt/json}}
128+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
129129

130130
"status-code 400 is given, returns data"
131131
400
132132
'({:errors ["Collection [C1200465592-PROV1] does not exist or is not visible."], :associated-item {:concept-id "C1200465592-PROV1"}})
133133
{:status 400
134134
:body "[{\"errors\":[\"Collection [C1200465592-PROV1] does not exist or is not visible.\"],\"associated_item\":{\"concept_id\":\"C1200465592-PROV1\"}}]"
135-
:headers {"Content-Type" mt/json}}))
135+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}))
136136

137137
(deftest add-individual-statuses-test
138138
(util/are3 [input expected]

search-app/test/cmr/search/test/unit/api/generic_association.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@
3737
{:errors ["Concept [C1200465592-JM_PROV1] does not exist or is not visible."] :associated-item {:concept-id "C1200000013-PROV1"}})
3838
{:status 207
3939
:body "[{\"generic_association\":{\"concept_id\":\"GA1200000026-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000013-PROV1\"},\"status\":200},{\"generic_association\":{\"concept_id\":\"GA1200000028-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000014-PROV1\"},\"status\":200},{\"errors\":[\"Concept [C1200465592-JM_PROV1] does not exist or is not visible.\"],\"associated_item\":{\"concept_id\":\"C1200000013-PROV1\"},\"status\":400}]"
40-
:headers {"Content-Type" mt/json}}
40+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
4141

4242
"status-code 200 is given, returns data"
4343
200
4444
'({:generic-association {:concept-id "GA1200000026-CMR" :revision-id 1} :associated-item {:concept-id "C1200000013-PROV1"}}
4545
{:generic-association {:concept-id "GA1200000028-CMR" :revision-id 1} :associated-item {:concept-id "C1200000014-PROV1"}})
4646
{:status 200
4747
:body "[{\"generic_association\":{\"concept_id\":\"GA1200000026-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000013-PROV1\"}},{\"generic_association\":{\"concept_id\":\"GA1200000028-CMR\",\"revision_id\":1},\"associated_item\":{\"concept_id\":\"C1200000014-PROV1\"}}]"
48-
:headers {"Content-Type" mt/json}}
48+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
4949

5050
"status-code 400 is given, returns data"
5151
400
5252
'({:errors ["Concept [C1200465592-JM_PROV1] does not exist or is not visible."] :associated-item {:concept-id "C1200000013-PROV1"}})
5353
{:status 400
5454
:body "[{\"errors\":[\"Concept [C1200465592-JM_PROV1] does not exist or is not visible.\"],\"associated_item\":{\"concept_id\":\"C1200000013-PROV1\"}}]"
55-
:headers {"Content-Type" mt/json}}))
55+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}))

search-app/test/cmr/search/test/unit/api/tags.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
{:errors ["Collection [C1200000011-JM_PROV1] does not exist or is not visible."], :tagged-item {:concept-id "C1200000011-JM_PROV1"}})
3434
{:status 207
3535
:body "[{\"tag_association\":{\"concept_id\":\"TA1200000003-CMR\",\"revision_id\":1},\"tagged_item\":{\"concept_id\":\"C1200000001-JM_PROV1\"},\"status\":200},{\"errors\":[\"Collection [C1200000011-JM_PROV1] does not exist or is not visible.\"],\"tagged_item\":{\"concept_id\":\"C1200000011-JM_PROV1\"},\"status\":400}]"
36-
:headers {"Content-Type" mt/json}}
36+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
3737

3838
"status-code 200 is given, returns data"
3939
200
4040
'({:tag-association {:concept-id "TA1200000003-CMR", :revision-id 1}, :tagged-item {:concept-id "C1200000001-JM_PROV1"}})
4141
{:status 200
4242
:body "[{\"tag_association\":{\"concept_id\":\"TA1200000003-CMR\",\"revision_id\":1},\"tagged_item\":{\"concept_id\":\"C1200000001-JM_PROV1\"}}]"
43-
:headers {"Content-Type" mt/json}}
43+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}
4444

4545
"status-code 400 is given, returns data"
4646
400
4747
'({:errors ["Collection [C1200000011-JM_PROV1] does not exist or is not visible."], :tagged-item {:concept-id "C1200000011-JM_PROV1"}})
4848
{:status 400
4949
:body "[{\"errors\":[\"Collection [C1200000011-JM_PROV1] does not exist or is not visible.\"],\"tagged_item\":{\"concept_id\":\"C1200000011-JM_PROV1\"}}]"
50-
:headers {"Content-Type" mt/json}}))
50+
:headers {"Content-Type" (mt/with-utf-8 mt/json)}}))

0 commit comments

Comments
 (0)