diff options
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/salmon/salmon_test.exs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/web/salmon/salmon_test.exs b/test/web/salmon/salmon_test.exs index e722f08ef..f2b729da9 100644 --- a/test/web/salmon/salmon_test.exs +++ b/test/web/salmon/salmon_test.exs @@ -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) |