/pool_versions: fix exception in pool diffs.

https://danbooru.donmai.us/forum_topics/9127?page=280#forum_post_159633
This commit is contained in:
evazion
2019-09-10 14:58:12 -05:00
parent e815f46d2a
commit 372fd7df1b
3 changed files with 20 additions and 7 deletions

View File

@@ -47,5 +47,16 @@ class PoolVersionsControllerTest < ActionDispatch::IntegrationTest
assert_select "#pool-version-#{@versions[2].id}", false
end
end
context "diff action" do
should "render" do
@post = create(:post)
@pool = as (@user) { create(:pool) }
as (@user) { @pool.update(name: "blah", description: "desc", post_ids: [@post.id]) }
get diff_pool_version_path(@pool.versions.last.id)
assert_response :success
end
end
end
end