|
94 | 94 | expect(data.size).to eq(2) |
95 | 95 | expect(response).to have_meta_record_count(4) |
96 | 96 |
|
| 97 | + expect(json.dig('meta', 'page_count')).to be(2) |
97 | 98 | expect(json.dig('links', 'first')).to be_present |
98 | 99 | expect(json.dig('links', 'next')).to be_present |
99 | 100 | expect(json.dig('links', 'last')).to be_present |
|
109 | 110 | expect(data.size).to eq(1) |
110 | 111 | expect(response).to have_meta_record_count(4) |
111 | 112 |
|
| 113 | + expect(json.dig('meta', 'page_count')).to be(4) |
112 | 114 | expect(json.dig('links', 'first')).to be_present |
113 | 115 | expect(json.dig('links', 'prev')).to be_present |
114 | 116 | expect(json.dig('links', 'next')).to be_present |
|
126 | 128 |
|
127 | 129 | expect(data.size).to eq(1) |
128 | 130 |
|
| 131 | + expect(json.dig('meta', 'page_count')).to be(4) |
129 | 132 | expect(json.dig('links', 'first')).to be_present |
130 | 133 | expect(json.dig('links', 'prev')).to be_present |
131 | 134 | expect(json.dig('links', 'next')).not_to be_present |
|
142 | 145 | expect(subject).to have_http_status :ok |
143 | 146 | expect(subject).to have_meta_record_count(4) |
144 | 147 | expect(data.size).to be <= JSONAPI.configuration.default_page_size |
| 148 | + expect(json.dig('meta', 'page_count')).to be(1) |
145 | 149 | end |
146 | 150 | end |
147 | 151 | end |
|
0 commit comments