Add deletion to masto api.
[akkoma] / test / web / salmon / salmon_test.exs
index e722f08efb85a562fac6739e2e1d188f456948c9..f2b729da9b3651d0c2ca29a71800da601c8249be 100644 (file)
@@ -8,6 +8,8 @@ defmodule Pleroma.Web.Salmon.SalmonTest do
 
   @wrong_magickey "RSA.pu0s-halox4tu7wmES1FVSx6u-4wc0YrUFXcqWXZG4-27UmbCOpMQftRCldNRfyA-qLbz-eqiwQhh-1EwUvjsD4cYbAHNGHwTvDOyx5AKthQUP44ykPv7kjKGh3DWKySJvcs9tlUG87hlo7AvnMo9pwRS_Zz2CacQ-MKaXyDepk=.AQAA"
 
+  @magickey_friendica "RSA.AMwa8FUs2fWEjX0xN7yRQgegQffhBpuKNC6fa5VNSVorFjGZhRrlPMn7TQOeihlc9lBz2OsHlIedbYn2uJ7yCs0.AQAB"
+
   test "decodes a salmon" do
     {:ok, salmon} = File.read("test/fixtures/salmon.xml")
     {:ok, doc} = Salmon.decode_and_validate(@magickey, salmon)
@@ -32,6 +34,10 @@ defmodule Pleroma.Web.Salmon.SalmonTest do
     assert @magickey == magic_key
   end
 
+  test "it decodes a friendica public key" do
+    key = Salmon.decode_key(@magickey_friendica)
+  end
+
   test "returns a public and private key from a pem" do
     pem = File.read!("test/fixtures/private_key.pem")
     {:ok, private, public} = Salmon.keys_from_pem(pem)