@@ -100,7 +100,7 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
100100 end
101101
102102 test "should apply offset for pagination" do
103- 5 . times . map { |i | Post . create! ( title : "Post #{ i } " , description : "Desc #{ i } " ) }
103+ 5 . times . map { |i | Post . create! ( title : "Post #{ i } 123 " , description : "Desc #{ i } teste " ) }
104104
105105 response = Posts ::IndexTool . call ( offset : 2 , limit : 2 , server_context : { } )
106106
@@ -124,7 +124,7 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
124124 end
125125
126126 test "should use default limit of 20" do
127- 25 . times { |i | Post . create! ( title : "Post #{ i } " , description : "Desc #{ i } " ) }
127+ 25 . times { |i | Post . create! ( title : "Post #{ i } 123 " , description : "Desc #{ i } teste " ) }
128128
129129 response = Posts ::IndexTool . call ( server_context : { } )
130130
@@ -151,7 +151,7 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
151151 end
152152
153153 test "should handle search_term with special characters" do
154- Post . create! ( title : "C++ Programming" , description : "Learn C++" )
154+ Post . create! ( title : "C++ Programming" , description : "Desc Learn C++" )
155155
156156 response = Posts ::IndexTool . call ( search_term : "C++" , server_context : { } )
157157
@@ -162,8 +162,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
162162 # Testes de Ordenação
163163
164164 test "should sort by created_at ascending" do
165- Post . create! ( title : "Old Post" , description : "Old" , created_at : 2 . days . ago )
166- Post . create! ( title : "New Post" , description : "New" , created_at : 1 . day . ago )
165+ Post . create! ( title : "Old Post" , description : "Desc Post Old" , created_at : 2 . days . ago )
166+ Post . create! ( title : "New Post" , description : "Desc Post New" , created_at : 1 . day . ago )
167167
168168 response = Posts ::IndexTool . call ( sort_by : "created_at" , sort_order : "asc" , server_context : { } )
169169
@@ -175,8 +175,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
175175 end
176176
177177 test "should sort by created_at descending" do
178- Post . create! ( title : "Old Post" , description : "Old" , created_at : 2 . days . ago )
179- Post . create! ( title : "New Post" , description : "New" , created_at : 1 . day . ago )
178+ Post . create! ( title : "Old Post" , description : "Desc Post Old" , created_at : 2 . days . ago )
179+ Post . create! ( title : "New Post" , description : "Desc Post New" , created_at : 1 . day . ago )
180180
181181 response = Posts ::IndexTool . call ( sort_by : "created_at" , sort_order : "desc" , server_context : { } )
182182
@@ -188,8 +188,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
188188 end
189189
190190 test "should sort by updated_at ascending" do
191- Post . create! ( title : "First" , description : "Desc" , updated_at : 2 . days . ago )
192- Post . create! ( title : "Second" , description : "Desc" , updated_at : 1 . day . ago )
191+ Post . create! ( title : "First Post " , description : "Desc Post 123 " , updated_at : 2 . days . ago )
192+ Post . create! ( title : "Second Post " , description : "Desc Post 123 " , updated_at : 1 . day . ago )
193193
194194 response = Posts ::IndexTool . call ( sort_by : "updated_at" , sort_order : "asc" , server_context : { } )
195195
@@ -201,8 +201,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
201201 end
202202
203203 test "should sort by updated_at descending" do
204- Post . create! ( title : "First" , description : "Desc" , updated_at : 2 . days . ago )
205- Post . create! ( title : "Second" , description : "Desc" , updated_at : 1 . day . ago )
204+ Post . create! ( title : "First" , description : "Desc first " , updated_at : 2 . days . ago )
205+ Post . create! ( title : "Second" , description : "Desc second " , updated_at : 1 . day . ago )
206206
207207 response = Posts ::IndexTool . call ( sort_by : "updated_at" , sort_order : "desc" , server_context : { } )
208208
@@ -246,9 +246,9 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
246246 end
247247
248248 test "should handle case-insensitive title sorting" do
249- Post . create! ( title : "zebra" , description : "Lowercase" )
250- Post . create! ( title : "Apple" , description : "Capitalized" )
251- Post . create! ( title : "MONKEY" , description : "Uppercase" )
249+ Post . create! ( title : "zebra" , description : "Lowercase 132 " )
250+ Post . create! ( title : "Apple" , description : "Capitalized 123 " )
251+ Post . create! ( title : "MONKEY" , description : "Uppercase 123 " )
252252
253253 response = Posts ::IndexTool . call ( sort_by : "title" , sort_order : "asc" , server_context : { } )
254254
@@ -262,8 +262,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
262262 end
263263
264264 test "should use default sort_by when not specified" do
265- Post . create! ( title : "Old" , description : "Desc" , created_at : 2 . days . ago )
266- Post . create! ( title : "New" , description : "Desc" , created_at : 1 . day . ago )
265+ Post . create! ( title : "Old" , description : "Desc 12345 " , created_at : 2 . days . ago )
266+ Post . create! ( title : "New" , description : "Desc 12345 " , created_at : 1 . day . ago )
267267
268268 response = Posts ::IndexTool . call ( server_context : { } )
269269
@@ -275,8 +275,8 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
275275 end
276276
277277 test "should use default sort_order when not specified" do
278- Post . create! ( title : "First" , description : "Desc" , created_at : 2 . days . ago )
279- Post . create! ( title : "Second" , description : "Desc" , created_at : 1 . day . ago )
278+ Post . create! ( title : "First" , description : "Desc 12345 " , created_at : 2 . days . ago )
279+ Post . create! ( title : "Second" , description : "Desc 12345 " , created_at : 1 . day . ago )
280280
281281 response = Posts ::IndexTool . call ( sort_by : "created_at" , server_context : { } )
282282
@@ -333,9 +333,9 @@ class Posts::IndexToolTest < ActiveSupport::TestCase
333333
334334 test "should handle sorting with identical timestamps" do
335335 timestamp = 1 . day . ago
336- Post . create! ( title : "Post A" , description : "Desc A" , created_at : timestamp )
337- Post . create! ( title : "Post B" , description : "Desc B" , created_at : timestamp )
338- Post . create! ( title : "Post C" , description : "Desc C" , created_at : timestamp )
336+ Post . create! ( title : "Post A" , description : "Desc A 123 " , created_at : timestamp )
337+ Post . create! ( title : "Post B" , description : "Desc B 123 " , created_at : timestamp )
338+ Post . create! ( title : "Post C" , description : "Desc C 123 " , created_at : timestamp )
339339
340340 response = Posts ::IndexTool . call ( sort_by : "created_at" , sort_order : "desc" , server_context : { } )
341341
0 commit comments