test: add test for failing nostr report event
This commit is contained in:
1 parent
453d540255
commit
d489bcc586
3 files changed
+227
-3
No files matched your search
@@ -170,6 +170,7 @@
|
||||
4C64987C286D03E000EAE2B3 /* DirectMessagesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C64987B286D03E000EAE2B3 /* DirectMessagesView.swift */; };
|
||||
4C64987E286D082C00EAE2B3 /* DirectMessagesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C64987D286D082C00EAE2B3 /* DirectMessagesModel.swift */; };
|
||||
4C649881286E0EE300EAE2B3 /* secp256k1 in Frameworks */ = {isa = PBXBuildFile; productRef = 4C649880286E0EE300EAE2B3 /* secp256k1 */; };
|
||||
4C684A552A7E91FE005E6031 /* LongPostTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C684A542A7E91FE005E6031 /* LongPostTests.swift */; };
|
||||
4C687C212A5F7ED00092C550 /* DamusBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C687C202A5F7ED00092C550 /* DamusBackground.swift */; };
|
||||
4C687C242A5FA86D0092C550 /* SearchHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C687C232A5FA86D0092C550 /* SearchHeaderView.swift */; };
|
||||
4C687C272A6039500092C550 /* TestData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C687C262A6039500092C550 /* TestData.swift */; };
|
||||
@@ -697,6 +698,7 @@
|
||||
4C633351283D419F00B1C9C3 /* SignalModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignalModel.swift; sourceTree = "<group>"; };
|
||||
4C64987B286D03E000EAE2B3 /* DirectMessagesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectMessagesView.swift; sourceTree = "<group>"; };
|
||||
4C64987D286D082C00EAE2B3 /* DirectMessagesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectMessagesModel.swift; sourceTree = "<group>"; };
|
||||
4C684A542A7E91FE005E6031 /* LongPostTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LongPostTests.swift; sourceTree = "<group>"; };
|
||||
4C687C202A5F7ED00092C550 /* DamusBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusBackground.swift; sourceTree = "<group>"; };
|
||||
4C687C232A5FA86D0092C550 /* SearchHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchHeaderView.swift; sourceTree = "<group>"; };
|
||||
4C687C262A6039500092C550 /* TestData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestData.swift; sourceTree = "<group>"; };
|
||||
@@ -1712,7 +1714,6 @@
|
||||
4CE6DEF627F7A08200C66700 /* damusTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C0379642A7BFE8E0037B8C4 /* Events */,
|
||||
4C9B0DEC2A65A74000CBDA21 /* Util */,
|
||||
4C0C03962A61E2670098B3B8 /* Fixtures */,
|
||||
4C7D097D2A0C58B900943473 /* WalletConnectTests.swift */,
|
||||
@@ -1740,6 +1741,7 @@
|
||||
4C19AE542A5D977400C90DB7 /* HashtagTests.swift */,
|
||||
3AAC7A012A60FE72002B50DF /* LocalizationUtilTests.swift */,
|
||||
D78525242A7B2EA4002FA637 /* NoteContentViewTests.swift */,
|
||||
4C684A542A7E91FE005E6031 /* LongPostTests.swift */,
|
||||
);
|
||||
path = damusTests;
|
||||
sourceTree = "<group>";
|
||||
@@ -2465,6 +2467,7 @@
|
||||
4CE6DEF827F7A08200C66700 /* damusTests.swift in Sources */,
|
||||
3A3040F329A91366008A0F29 /* ProfileViewTests.swift in Sources */,
|
||||
4CF0ABDC2981A19E00D66079 /* ListTests.swift in Sources */,
|
||||
4C684A552A7E91FE005E6031 /* LongPostTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -2734,7 +2737,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 10;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = XK7H4JAB3D;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -2783,7 +2786,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
CURRENT_PROJECT_VERSION = 10;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = XK7H4JAB3D;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
||||
@@ -55,6 +55,178 @@ func test_damus_state() -> DamusState {
|
||||
return damus
|
||||
}
|
||||
|
||||
let test_failing_nostr_report = """
|
||||
{
|
||||
"id": "99198ecb6a34372b7e39b88280bab3394654a00f5f8504466fac2d6acb569663",
|
||||
"pubkey": "2edbcea694d164629854a52583458fd6d965b161e3c48b57d3aff01940558884",
|
||||
"created_at": 1691159126,
|
||||
"kind": 1,
|
||||
"tags": [
|
||||
[
|
||||
"p",
|
||||
"f901616f00a63f4f9c7881d4871a03df3d4cee7291eafd7adcbeea7c95c58e27"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"3f770d65d3a764a9c5cb503ae123e62ec7598ad035d836e2a810f3877a745b24"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"5b0183ab6c3e322bf4d41c6b3aef98562a144847b7499543727c5539a114563e"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"b83a28b7e4e5d20bd960c5faeb6625f95529166b8bdb045d42634a2f35919450"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"plebchainradio"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"ce41c1698a8c042218bc586f0b9ec8d5bffa3dcbcea09bd59db9d0d92c3fc0b4"
|
||||
],
|
||||
[
|
||||
"r",
|
||||
"https://nostrnests.com/plebchainradio"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"ce41c1698a8c042218bc586f0b9ec8d5bffa3dcbcea09bd59db9d0d92c3fc0b4"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"26bd32c67232bdf16d05e763ec67d883015eb99fd1269025224c20c6cfdb0158"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"4657dfe8965be8980a93072bcfb5e59a65124406db0f819215ee78ba47934b3e"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"btcprague"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"273e7880d38d39a7fb238efcf8957a1b5b27e819127a8483e975416a0a90f8d2"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"26bd32c67232bdf16d05e763ec67d883015eb99fd1269025224c20c6cfdb0158"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"nostr"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"purplepill"
|
||||
],
|
||||
[
|
||||
"r",
|
||||
"https://talks.adoptingbitcoin.org/adopting-bitcoin-2023/"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"3d82e8f6cc6c096544bf33e4875a03f5600acff7ec467e150a1cc7712d214dc9"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"nostr"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"v4v"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"b66be78da89991544a05c3a2b63da1d15eefe8e9a1bb6a4369f8616865bd6b7c"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"efc37e97fa4fad679e464b7a6184009b7cc7605aceb0c5f56b464d2b986a60f0"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"5fd693e61a7969ecf5c11dbf5ce20aedac1cea71721755b037955994bf6061bb"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"sideusupdate"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"damus"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"zaps"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"zaps"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"c6f7077f1699d50cf92a9652bfebffac05fc6842b9ee391089d959b8ad5d48fd"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"c5fb6ecc876e0458e3eca9918e370cbcd376901c58460512fe537a46e58c38bb"
|
||||
],
|
||||
[
|
||||
"r",
|
||||
"https://zapperne.ws"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"3356de61b39647931ce8b2140b2bab837e0810c0ef515bbe92de0248040b8bdd"
|
||||
],
|
||||
[
|
||||
"r",
|
||||
"https://nostrapp.link/a/naddr1qqxnzd3exqmnjvf38qmrjwpsqgst03hkj9w04xnzllm2rupxqn0g3s3ud3kx6xu0vtrucyr5nuc8aqgrqsqqql8kcqcp4e"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"50d94fc2d8580c682b071a542f8b1e31a200b0508bab95a33bef0855df281d63"
|
||||
],
|
||||
[
|
||||
"t",
|
||||
"nostr"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"9989500413fb756d8437912cc32be0730dbe1bfc6b5d2eef759e1456c239f905"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"bd4b16bc0875f85a40ea134b030d71c5a715ad0cea5f513d53ce2dd699d44d98"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"17538dc2a62769d09443f18c37cbe358fab5bbf981173542aa7c5ff171ed77c4"
|
||||
],
|
||||
[
|
||||
"p",
|
||||
"5c508c34f58866ec7341aaf10cc1af52e9232bb9f859c8103ca5ecf2aa93bf78"
|
||||
],
|
||||
[
|
||||
"r",
|
||||
"https://nostr.report"
|
||||
]
|
||||
],
|
||||
"content": "THE NOSTR REPORT\n\nSIZE MATTERS\nAug 4, 2023\nBlock Height: 801,657\nMoscow Time: 34:04 ⚡/ $\nV4V: 9 zaps totalling 8,900⚡\nTop Zapper: nostr:npub1lyqkzmcq5cl5l8rcs82gwxsrmu75emnjj84067kuhm48e9w93cns2hhj2g (x4 days!)\nNostr Report is committed to V4V, thank you to our supporters.\n—--------------------------\n🎙️Quote of the Day🎙️\n—--------------------------\n“Get back to your social roots and actually be social, engaging with as many Nostriches as possible.”\nnostr:npub18ams6ewn5aj2n3wt2qawzglx9mr4nzksxhvrdc4gzrecw7n5tvjqctp424\nnostr:note17y4edps6c9lmhxttfmm8xh9r9du5knllg6ys3aheck948ug4wlaqt9y790\n—--------------------------\n🚨Headline Nostr News🚨\n—--------------------------\nnostr:npub1tvqc82mv8cezhax5r34n4muc2c4pgjz8kaye2smj032nngg52clq0rkrq4 and nostr:npub1hqaz3dlyuhfqhktqchawke39l92jj9nt30dsgh2zvd9z7dv3j3gqpkt56s - It’s gonna be a 🔥 #PlebchainRadio today with nostr:npub1eequz6v23szzyx9utphsh8kg6kll50wte6sfh4vah8gdjtplcz6qg7at9s . Note the adjusted start time: 545p EST (UTC -4) 📻\nhttps://nostrnests.com/plebchainradio\nnostr:note1ryqp0qcpw4vcj86z252v9xd537se3kt008vk2dvzyzhhmy9laeysgzjpwd\nCheck out this great design from nostr:npub1eequz6v23szzyx9utphsh8kg6kll50wte6sfh4vah8gdjtplcz6qg7at9s 👀\nnostr:note1fnhtrfy8n5gzs8wjqvjlsmez8mrys3tdrrnq0s6djwek6gfx8fysssyfxk\n\nnostr:npub1y67n93njx27lzmg9ua37ce7csvq4awvl6ynfqffzfssvdn7mq9vqlhq62h interviews the nostr:npub1getal6ykt05fsz5nqu4uld09nfj3y3qxmv8crys4aeut53unfvlqr80nfm at #BTCPrague. Hear why they started Alby, the story behind their name, and more! 🐝\nnostr:note1ddq76u3thnjfqq4v8stvtjk7w2lexuccc78nrn0fh2kx5evzycfs53k9nf\n\nnostr:npub1yul83qxn35u607er3m7039t6rddj06qezfagfqlfw4qk5z5slrfqu8ncdu announced Ben Price Founder of OpenSats as a speaker. Make sure to get your tickets and be there to watch Ben and all of their other amazing speakers Sept 2nd to the 3rd! \nGet your tickets at baltichoneybadger.com\nnostr:note1c5962e0r8ve5hjy9j5lum0kte2t4djj5f22pezgy26nxqtqk6nesxjj8h2\n\nnostr:npub1y67n93njx27lzmg9ua37ce7csvq4awvl6ynfqffzfssvdn7mq9vqlhq62h Are you planning to go to Adopting Bitcoin 2023? If so, the organizers have paired with The Nostr Report and are looking for #nostr experts to #purplepill during the event! Join us, sign up to be a speaker, and share your nostr knowledge with the world!\nSign up here ➡️ https://talks.adoptingbitcoin.org/adopting-bitcoin-2023/ \nnostr:note18433yhxxkfvet984r8adrlaqhexhf8etjwpernn0sk9lgw875a8syg9c7m\n\nnostr:npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m announces that TIDAL is now all on free and open standards.\nnostr:note1cfvqjjqqyjfh44jwtf08pryg46u0mjrek63amazkah37p8r8smpqk8yttn\n\nnostr:npub18kpw3akvdsyk239lx0jgwksr74sq4nlha3r8u9g2rnrhztfpfhysy469c4 announces that they are now #Nostr only 🔥\nnostr:note1ggrc8kx7jtd0hz94qlchvaqdunasjt6hyc6rtckkdww56k0m7dzqzsd9lr\n\nnostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s releases Damus 1.6(8) which lays the groundwork for NostrDB integration, multi-reactions, and a new onboarding feature with suggested follows. More info to come later in a video update. 🔥\nnostr:note1p8mzclawd5kxg5rm326vdmlvqzhpwk3ya2g4y7p44t6e669wv6xqf7wfx4\nDamus then quickly released build 10 after Jack sends 3M ⚡️ and asks for a font size change 🔎 #V4V\nnostr:note19r377z58mww5w9s5mygatx4g4qcnum3kgac5f7fcgdfkcr9fwmxsp58796\n—--------------------------\n💻nostr Tech💻\n—--------------------------\nnostr:npub1ke470rdgnxg4gjs9cw3tv0dp690wl68f5xak5smflpsksedadd7qtf8jfm BDK release 0.28.1 is out! This patch release backports (from the BDK 1.0 dev branch) a fix for a bug in the policy condition calculation and adds a new taproot single key descriptor template (BIP-86).\nnostr:note16qdqdja673v32vfa9tsdh9qyx47rmwv2rf7ynvcas5v78xejzulq0w6kes\n\nnostr:npub1alpha9l6f7kk08jxfdaxrpqqnd7vwcz6e6cvtattgexjhxr2vrcqk86dsn announces ndk-react 0.1.1 release. See note for changes and updates.\nnostr:note1786fgjd8w4vnflzhu8u3k6lvszjrvlktp7gvjvykyd25fxxns56qyj7qv3\n\nnostr:npub1tltf8es60957eawprkl4ecs2akkpe6n3wgt4tvphj4vef0mqvxasv6ve7g #sideusupdate v0.8 a side-loaded iOS fork of #Damus which retains #zaps is now a available, you can now natively #zap\nnostr:note1hcjte28eu4ns8xyddx3rn5dn8z3re7u5ky599veajphcree7a30syryn85\n\nnostr:npub1cmmswlckn82se7f2jeftl6ll4szlc6zzh8hrjyyfm9vm3t2afr7svqlr6f Did you back up already? Make sure to keep all your data backed up with the new Nostryfied.online back up tool 🪩\nnostr:note1j3lk5qa93m8wwp6urse77c6829h4dg4hy24vst3nsdve9azdrvvss79kp7\n\nnostr:npub1chakany8dcz93clv4xgcudcvhnfhdyqutprq2yh72daydevv8zasmuhf02 introducing a alpha version of zapper news! Y Combinator's hacker news, on nostr! (zaps coming soon)\nhttps://zapperne.ws \nnostr:note1qqqqqz3c2nr5d558twvhrudamqmhx8afzlj9fffnmrmwtr30fw8qvu6wkc\n\nnostr:npub1xdtducdnjerex88gkg2qk2atsdlqsyxqaag4h05jmcpyspqt30wscmntxy Check out Slidestr - Shows slide shows of images and videos on the nostr platform. https://nosLine truncated
|
||||
"sig": "d3df816be463055fbded73477db922cfc6d25768a19b5cea3646f8a5a6972c56603ecc1832d6a1318d662847bf41c959483535eb54256a483917f30d6bb0be73"
|
||||
}
|
||||
"""
|
||||
|
||||
let longform_long_test_data = """
|
||||
## CURRENT PROGRAMMING
|
||||
@@ -196,3 +368,4 @@ let test_reply_json = """
|
||||
let test_contact_list_json = """
|
||||
{"content":"{\\\"wss://nos.lol\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://relay.damus.io\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"ws://monad.jb55.com:8080\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://nostr.wine\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://welcome.nostr.wine\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://eden.nostr.land\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://relay.mostr.pub\\\":{\\\"write\\\":true,\\\"read\\\":true},\\\"wss://nostr-pub.wellorder.net\\\":{\\\"write\\\":true,\\\"read\\\":true}}","created_at":1689904312,"id":"20d0ff27d6fcb13de8366328c5b1a7af26bcac07f2e558fbebd5e9242e608c09","kind":3,"pubkey":"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245","sig":"f388e9b45d2872e9320e2d092f52d3d9ccee7e83ef3376b48a705c22099d27736fcc750800e0b6cd4a2a6b7a44c4b0b435c7242392c7ceeb809da40c1fa1ee6c","tags":[["p","6cad545430904b84a8101c5783b65043f19ae29d2da1076b8fc3e64892736f03","wss://nostr-pub.wellorder.net"],["p","2ef93f01cd2493e04235a6b87b10d3c4a74e2a7eb7c3caf168268f6af73314b5","wss://nostr-pub.wellorder.net"],["p","9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437","wss://nostr.bitcoiner.social"],["p","b2d670de53b27691c0c3400225b65c35a26d06093bcc41f48ffc71e0907f9d4a","wss://nostr-relay.untethr.me"],["p","3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d","wss://nostr-relay.freeberty.net"],["p","8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168","wss://nostr-pub.wellorder.net"],["p","21763c71793764a2661eb10ede32a8f2312c9f8db08bc539c888bafa38dcf368"],["p","4570d7a0b49b5524797120810116a2a5c18281423b173a557056f08f15c5382d","wss://nostr-pub.wellorder.net"],["p","04c915daefee38317fa734444acee390a8269fe5810b2241e5e6dd343dfbecc9","wss://nostr-relay.freeberty.net"],["p","d3646691ba5b1d796c1e1b3430df00fe1189ec9c232877adde18c8f656af18f0"],["p","34af16f1787b261331a67fa519e9edb11f0a851c0b10a15901720b0fe0a06d1d"],["p","b7c66ce6f7bbe034e96be54c2ffc0adf631a889abc0834ba1431171b67c489aa"],["p","8355095016fddbe31fcf1453b26f613553e9758cf2263e190eac8fd96a3d3de9"],["p","3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681"],["p","35d26e4690cbe1a898af61cc3515661eb5fa763b57bd0b42e45099c8b32fd50f"],["p","0810b5bc4cddc3e7624a1f6acbdccdc95c6e9409c144ce83365ee04a3a63314e"],["p","51fc7209201b1414f721c3d2d2b3430699b1e6317716c5182cc1d7945072e358"],["p","e6a92d8b6c20426f78bba8510ccdc73df5122814a3bac1d553adebac67a92b27"],["p","619d0c0483a311a16767b0a7999ce9f28e58e79eff66f0edafae9ca2d9054f08"],["p","d7b76d02c758a62a505e03bd5f5049aaee4e7e36283d273c7f6798912692df2b"],["p","d4d4fdde8ab4924b1e452e896709a3bd236da4c0576274b52af5992d4d34762c"],["p","3878d95db7b854c3a0d3b2d6b7bf9bf28b36162be64326f5521ba71cf3b45a69"],["p","ac9ec020170155f0feb347f0d777ee5fc38dd1f36353093046323646cff5169f"],["p","d91191e30e00444b942c0e82cad470b32af171764c2275bee0bd99377efd4075"],["p","146bda4ec6932830503ee4f8e8b626bd7b3a5784232b8240ba15c8cbff9a07cd"],["p","ea75802dd1c86933c1e20c582541bb283d44c88e3445ed90d4375fc3d973f3a0"],["p","41108126409bf99cb77ff16fd53f4da2e53010b0dca04b0a53ebdf46eade37aa"],["p","9682c33f9024dadb1bffdf762c3156e26b4aa340de8d06c91ca537fcc0fdb3a9"],["p","a8f14f05c64f9e62bdada89c21a52f09aa5d7948b47ccf52da1be16b0de9efac"],["p","80482e60178c2ce996da6d67577f56a2b2c47ccb1c84c81f2b7960637cb71b78"],["p","b10c0000079a83cf26815dc7538818d8d56a2983e374e30a4143e50060978457"],["p","547fcc5c7e655fe7c83da5a812e6332f0a4779c87bf540d8e75a4edbbf36fe4a"],["p","dd81a8bacbab0b5c3007d1672fb8301383b4e9583d431835985057223eb298a5"],["p","bb1cf5250435ff475cd8b32acb23e3ee7bbe8fc38f6951704b4798513947672c"],["p","1fa91680ebfc68069ec13423fc8b9b0a746e9265584e16cf7d80be7ad721de6e"],["p","52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd"],["p","d8139f130cc1dec5d92e3a4dc49fb11f064bf5b32c65d96da107ba2389547dc7"],["p","9ac12013d20fae4f8829ba4e5ba6343e410288d3a0752d6143386d2c1af1f57e"],["p","46fcbe3065eaf1ae7811465924e48923363ff3f526bd6f73d7c184b16bd8ce4d"],["p","4b0572ab1f9a575415326b599f1179c20134bc23040d207156e71800b4ed33fe"],["p","2fa4b9ba71b6dab17c4723745bb7850dfdafcb6ae1a8642f76f9c64fa5f43436"],["p","3235036bd0957dfb27ccda02d452d7c763be40c91a1ac082ba6983b25238388c"],["p","954aaf69c2e7c9fb3f9998f61944ab8ab08ce3c8679ecd985e4486a6eb696217"],["p","d7f0e3917c466f1e2233e9624fbd6d4bd1392dbcfcaf3574f457569d496cb731"],["p","08b80da85ba68ac031885ea555ab42bb42231fde9b690bbd0f48c128dfbf8009"],["p","104749bc9151a0e54b9845ee50fc4b559439dd1ada006e36a6c49ad3ea16a55c"],["p","c47daa0cd21a70797fe9404f8fe0c3f679c2b46148788d1295e6424232064f1d"],["p","d987084c48390a290f5d2a34603ae64f55137d9b4affced8c0eae030eb222a25"],["p","e1ff3bfdd4e40315959b08b4fcc8245eaa514637e1d4ec2ae166b743341be1af"],["p","cf9413eb6bbe55c8a3c10119ec0635e134fa266f2c50f825d7225da9b92ecc4e"],["p","bae77874946ec111f94be59aef282de092dc4baf213f8ecb8c9e15cb7ed7304e"],["p","c7eda660a6bc8270530e82b4a7712acdea2e31dc0a56f8dc955ac009efd97c86"],["p","2590201e2919a8aa6568c88900192aa54ef00e6c0974a5Line truncated
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// LongPostTests.swift
|
||||
// damusTests
|
||||
//
|
||||
// Created by William Casarin on 2023-08-05.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import damus
|
||||
|
||||
final class LongPostTests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func testLongPost() throws {
|
||||
let contacts = Contacts(our_pubkey: test_keypair.pubkey)
|
||||
let json = "[\"EVENT\",\"subid\",\(test_failing_nostr_report)]"
|
||||
let resp = NostrResponse.owned_from_json(json: json)
|
||||
|
||||
XCTAssertNotNil(resp)
|
||||
guard let resp,
|
||||
case .event(let subid, let ev) = resp
|
||||
else {
|
||||
XCTAssertFalse(true)
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(subid, "subid")
|
||||
XCTAssertTrue(ev.should_show_event)
|
||||
XCTAssertTrue(!ev.too_big)
|
||||
XCTAssertTrue(should_show_event(contacts: contacts, ev: ev))
|
||||
XCTAssertTrue(validate_event(ev: ev) == .ok )
|
||||
}
|
||||
|
||||
func testPerformanceExample() throws {
|
||||
// This is an example of a performance test case.
|
||||
self.measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user