|
5 | 5 | client.create_index('books').await |
6 | 6 |
|
7 | 7 | index = client.fetch_index('books') |
8 | | - expect(index).to be_a(MeiliSearch::Index) |
| 8 | + expect(index).to be_a(described_class) |
9 | 9 | expect(index.uid).to eq('books') |
10 | 10 | expect(index.created_at).to be_a(Time) |
11 | 11 | expect(index.created_at).to be_within(60).of(Time.now) |
|
59 | 59 | task.await |
60 | 60 |
|
61 | 61 | index = client.fetch_index('uid') |
62 | | - expect(index).to be_a(MeiliSearch::Index) |
| 62 | + expect(index).to be_a(described_class) |
63 | 63 | expect(index.uid).to eq('uid') |
64 | 64 | expect(index.primary_key).to eq('new_primary_key') |
65 | 65 | expect(index.fetch_primary_key).to eq('new_primary_key') |
|
77 | 77 | task.await |
78 | 78 |
|
79 | 79 | index = client.fetch_index('books') |
80 | | - expect(index).to be_a(MeiliSearch::Index) |
| 80 | + expect(index).to be_a(described_class) |
81 | 81 | expect(index.uid).to eq('books') |
82 | 82 | expect(index.primary_key).to eq('international_standard_book_number') |
83 | 83 | expect(index.fetch_primary_key).to eq('international_standard_book_number') |
|
111 | 111 | index = new_client.fetch_index('books') |
112 | 112 | expect(index.options).to eq({ max_retries: 1, timeout: 2, convert_body?: true }) |
113 | 113 |
|
114 | | - expect(MeiliSearch::Index).to receive(:get).with( |
| 114 | + expect(described_class).to receive(:get).with( |
115 | 115 | "#{URL}/indexes/books", |
116 | 116 | { |
117 | 117 | headers: expected_headers, |
|
139 | 139 | index = new_client.fetch_index('books') |
140 | 140 | expect(index.options).to eq(options.merge({ convert_body?: true })) |
141 | 141 |
|
142 | | - expect(MeiliSearch::Index).to receive(:get).with( |
| 142 | + expect(described_class).to receive(:get).with( |
143 | 143 | "#{URL}/indexes/books", |
144 | 144 | { |
145 | 145 | headers: expected_headers, |
|
194 | 194 | task.await |
195 | 195 |
|
196 | 196 | index = client.fetch_index('uid') |
197 | | - expect(index).to be_a(MeiliSearch::Index) |
| 197 | + expect(index).to be_a(described_class) |
198 | 198 | expect(index.uid).to eq('uid') |
199 | 199 | expect(index.primary_key).to eq('new_primary_key') |
200 | 200 | expect(index.fetch_primary_key).to eq('new_primary_key') |
|
0 commit comments