Skip to content

Commit

Permalink
feat: Add controller test for shop summary paginat
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Feb 4, 2024
1 parent ddc2f19 commit 30e8888
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/controllers/summarys/shop_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require 'test_helper'

class ShopControllerTest < ActionController::TestCase
setup do
@user = users(:one)
@selected_app = apps(:one)
@summary = Summary::Shop.new(user: @user, selected_app: @selected_app).summarize(page: 1, per_page: 1)
sign_in @user
end

test "index pagination" do
get :index, params: { selected_app: @selected_app.id, page: 1 }
assert_response :success
assert_equal @summary, assigns(:summaries)
end
end

0 comments on commit 30e8888

Please sign in to comment.