|
10 | 10 | [cmr.message-queue.topic.topic-protocol :as topic-protocol] |
11 | 11 | [cmr.metadata-db.config :as mdb-config] |
12 | 12 | [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] |
14 | 14 | [cmr.redis-utils.test.test-util :as redis-test-util] |
15 | 15 | [cmr.message-queue.queue.aws-queue :as queue])) |
16 | 16 |
|
|
402 | 402 | ;; 'subscription_worker' |
403 | 403 | (deftest create-notification-test |
404 | 404 | (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"} |
406 | 409 | concept {:concept-id "G12345-PROV1" |
407 | 410 | :revision-id 1 |
| 411 | + :extra-fields {:granule-ur "GranuleUR"} |
408 | 412 | :metadata "{\"GranuleUR\": \"GranuleUR\", |
409 | 413 | \"DataGranule\": {\"Identifiers\": [{\"IdentifierType\": \"ProducerGranuleId\", |
410 | 414 | \"Identifier\": \"Algorithm-1\"}]}}"} |
411 | 415 | xml-concept {:concept-id "G12345-PROV1" |
412 | 416 | :revision-id 1 |
| 417 | + :extra-fields {:granule-ur "GranuleUR"} |
413 | 418 | :metadata |
414 | 419 | "<Granule> |
415 | 420 | <GranuleUR> |
|
421 | 426 | </ProducerGranuleId> |
422 | 427 | </DataGranule> |
423 | 428 | </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")))) |
426 | 431 |
|
427 | 432 | (deftest create-message-attributes-test |
428 | 433 | (testing "Creating the message attributes." |
|
0 commit comments