Skip to content

Commit fa62a6f

Browse files
committed
CMR-10556: fixing the tests for the new fields
1 parent dc88707 commit fa62a6f

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

metadata-db-app/test/cmr/metadata_db/test/services/subscriptions_test.clj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[cmr.message-queue.topic.topic-protocol :as topic-protocol]
1111
[cmr.metadata-db.config :as mdb-config]
1212
[cmr.metadata-db.services.subscription-cache :as subscription-cache]
13-
[cmr.metadata-db.services.subscriptions :as subscriptions]
13+
[cmr.metadata-db.services.subscriptions :as subscriptions]
1414
[cmr.redis-utils.test.test-util :as redis-test-util]
1515
[cmr.message-queue.queue.aws-queue :as queue]))
1616

@@ -402,14 +402,19 @@
402402
;; 'subscription_worker'
403403
(deftest create-notification-test
404404
(testing "Getting the notification for a concept."
405-
(let [expected (str "{\"concept-id\": \"G12345-PROV1\"}")
405+
(let [expected {"concept-id" "G12345-PROV1"
406+
"revision-id" "1"
407+
"granule-ur" "GranuleUR"
408+
"location" "http://localhost:3003/concepts/G12345-PROV1/1"}
406409
concept {:concept-id "G12345-PROV1"
407410
:revision-id 1
411+
:extra-fields {:granule-ur "GranuleUR"}
408412
:metadata "{\"GranuleUR\": \"GranuleUR\",
409413
\"DataGranule\": {\"Identifiers\": [{\"IdentifierType\": \"ProducerGranuleId\",
410414
\"Identifier\": \"Algorithm-1\"}]}}"}
411415
xml-concept {:concept-id "G12345-PROV1"
412416
:revision-id 1
417+
:extra-fields {:granule-ur "GranuleUR"}
413418
:metadata
414419
"<Granule>
415420
<GranuleUR>
@@ -421,8 +426,8 @@
421426
</ProducerGranuleId>
422427
</DataGranule>
423428
</Granule>"}]
424-
(is (= expected (subscriptions/create-notification-message-body concept)) "JSON test")
425-
(is (= expected (subscriptions/create-notification-message-body xml-concept)) "XML test"))))
429+
(is (= expected (json/decode (subscriptions/create-notification-message-body concept))) "JSON test")
430+
(is (= expected (json/decode (subscriptions/create-notification-message-body xml-concept))) "XML test"))))
426431

427432
(deftest create-message-attributes-test
428433
(testing "Creating the message attributes."

0 commit comments

Comments
 (0)