         "id" => 23,
         "login" => "ghost",
         "avatar_url" => "U"}}
+
+    {:ok, pr_standard: pr_standard}
+  end
+
+  test "can parse a Poison-decoded JSON *without* mergeable field", %{pr_standard: pr_standard} do
+    pr_without_field = pr_standard
+
+    result = BorsNG.GitHub.Pr.from_json pr_without_field
 
     assert result == {:ok, %BorsNG.GitHub.Pr{
       number: 1,

    }}
  end

  test "can parse a Poison-decoded JSON *with* mergeable field" do
    result = BorsNG.GitHub.Pr.from_json %{
      "number" => 1,
      "title" => "T",
      "body" => "B",
      "state" => "open",
      "base" => %{"ref" => "OTHER_BRANCH", "repo" => %{"id" => 456}},
      "head" => %{
        "sha" => "B",
        "ref" => "BAR_BRANCH",
        "repo" => %{
          "id" => 345
        },
      },
      "merged_at" => nil,
      "mergeable" => true,
      "user" => %{
        "id" => 23,
        "login" => "ghost",
        "avatar_url" => "U"}}

    assert result == {:ok, %BorsNG.GitHub.Pr{
      number: 1,

      mergeable: true
    }}
  end
end
