@@ -16,7 +16,7 @@ class MavenTest < ActiveSupport::TestCase
16
16
17
17
test 'registry_url with version' do
18
18
registry_url = @ecosystem . registry_url ( @package , @version )
19
- assert_equal registry_url , "https://central.sonatype.com/artifact/dev.zio/zio-aws-autoscaling_3/5.17.224.2/ "
19
+ assert_equal registry_url , "https://central.sonatype.com/artifact/dev.zio/zio-aws-autoscaling_3/5.17.224.2"
20
20
end
21
21
22
22
test 'download_url' do
@@ -70,10 +70,19 @@ class MavenTest < ActiveSupport::TestCase
70
70
end
71
71
72
72
test 'recently_updated_package_names' do
73
+ stub_request ( :post , "https://central.sonatype.com/api/internal/browse/components?repository=maven-central" )
74
+ . with (
75
+ body : "{\" size\" :20,\" sortField\" :\" publishedDate\" ,\" sortDirection\" :\" desc\" }" ,
76
+ headers : {
77
+ 'Content-Type' => 'application/json' ,
78
+ 'Expect' => '' ,
79
+ 'User-Agent' => 'packages.ecosyste.ms ([email protected] )'
80
+ } )
81
+ . to_return ( status : 200 , body : '{"items":[]}' , headers : { } )
73
82
stub_request ( :get , "https://maven.libraries.io/mavenCentral/recent" )
74
83
. to_return ( { status : 200 , body : file_fixture ( 'maven/recent' ) } )
75
84
recently_updated_package_names = @ecosystem . recently_updated_package_names
76
- assert_equal recently_updated_package_names . length , 100
85
+ assert_equal recently_updated_package_names . length , 20
77
86
end
78
87
79
88
test 'package_metadata' do
0 commit comments