summaryrefslogtreecommitdiff
path: root/spec/unit/dotnet
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-09 14:43:24 -0600
committermo khan <mo.khan@gmail.com>2020-03-09 14:43:24 -0600
commitb31c3e0149a83bd354b6de16702744a8fbfed436 (patch)
treed108e6bf630785ed7bbe0f45f4c7eccb18012c60 /spec/unit/dotnet
parent37ba68f6aed4dbbc350222195e0125eaa2a0cb0b (diff)
Allow iterating through nuget packages starting from a page
Diffstat (limited to 'spec/unit/dotnet')
-rw-r--r--spec/unit/dotnet/nuget_gateway_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/dotnet/nuget_gateway_spec.rb b/spec/unit/dotnet/nuget_gateway_spec.rb
index aab9cc0..123a92f 100644
--- a/spec/unit/dotnet/nuget_gateway_spec.rb
+++ b/spec/unit/dotnet/nuget_gateway_spec.rb
@@ -17,4 +17,19 @@ RSpec.describe Spandx::Dotnet::NugetGateway do
pending 'when the package specifies the license using a file'
pending 'when the package specifies the license using a url'
end
+
+ describe "#each" do
+ it 'fetches each item starting from a specific page' do
+ called = false
+
+ VCR.use_cassette('nuget-catalogue-from-page-0') do
+ subject.each(page: 0) do |item, page|
+ called = true
+ expect(page).to end_with('page0.json')
+ end
+ end
+
+ expect(called).to be(true)
+ end
+ end
end