Fix exception in /pools/:id/order/edit.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<%= render "posts/partials/common/inline_blacklist" %>
|
<%= render "posts/partials/common/inline_blacklist" %>
|
||||||
|
|
||||||
<ul id="sortable">
|
<ul id="sortable">
|
||||||
<% @pool.posts(:limit => 1_000).each do |post| %>
|
<% @pool.posts.limit(100).each do |post| %>
|
||||||
<li class="ui-state-default" id="pool[post_ids]_<%= post.id %>">
|
<li class="ui-state-default" id="pool[post_ids]_<%= post.id %>">
|
||||||
<%= PostPresenter.preview(post).presence || "Hidden: Post ##{post.id}" %>
|
<%= PostPresenter.preview(post).presence || "Hidden: Post ##{post.id}" %>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
21
test/functional/pool_orders_controller_test.rb
Normal file
21
test/functional/pool_orders_controller_test.rb
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class PoolOrdersControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
context "The pool orders controller" do
|
||||||
|
context "edit action" do
|
||||||
|
should "render" do
|
||||||
|
user = create(:user)
|
||||||
|
|
||||||
|
as(user) do
|
||||||
|
posts = create_list(:post, 3)
|
||||||
|
pool = create(:pool)
|
||||||
|
posts.each { |p| pool.add!(p) }
|
||||||
|
|
||||||
|
get_auth edit_pool_order_path(pool), user
|
||||||
|
assert_response :success
|
||||||
|
assert_select "article.post-preview", 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user