+ test "a quote" do
+ note = insert(:note_activity)
+ user = insert(:user)
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "hehe", quote_id: note.id})
+
+ status = StatusView.render("show.json", %{activity: activity})
+
+ assert status.quote_id == to_string(note.id)
+
+ [status] = StatusView.render("index.json", %{activities: [activity], as: :activity})
+
+ assert status.quote_id == to_string(note.id)
+ end
+
+ test "a quote that we can't resolve" do
+ note = insert(:note_activity, quoteUri: "oopsie")
+
+ status = StatusView.render("show.json", %{activity: note})
+
+ assert is_nil(status.quote_id)
+ assert is_nil(status.quote)
+ end
+