File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 33require "spec_helper"
44require "seam/paginator"
55
6- # Integration tests for Paginator using the fake Seam Connect server
76RSpec . describe Seam ::Paginator do
8- # Use the helper to run a fake server and get a configured client
97 around do |example |
108 with_fake_seam_connect do |seam , _endpoint , _seed |
11- @seam = seam # Store seam client for use in tests
9+ @seam = seam
1210 example . run
1311 end
1412 end
1513
16- let ( :seam ) { @seam } # Make seam client available via let
17-
18- # The default seed in fake-seam-connect creates 3 connected accounts.
19- let ( :total_accounts ) { 3 }
14+ let ( :seam ) { @seam }
2015
2116 describe "#first_page" do
2217 it "fetches the first page of results and pagination info" do
6156
6257 describe "#flatten_to_list" do
6358 it "fetches all items from all pages into a single list" do
59+ total_accounts = seam . connected_accounts . list . size
6460 paginator = seam . create_paginator ( seam . connected_accounts . method ( :list ) , { limit : 1 } )
6561 paginated_accounts = paginator . flatten_to_list
6662
7369
7470 describe "#flatten" do
7571 it "returns an Enumerator that yields all items from all pages" do
72+ total_accounts = seam . connected_accounts . list . size
7673 paginator = seam . create_paginator ( seam . connected_accounts . method ( :list ) , { limit : 1 } )
7774 enumerator = paginator . flatten
7875
You can’t perform that action at this time.
0 commit comments