Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests #1

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 2 additions & 38 deletions pub/spec/dependabot/pub/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}],
"previous_version" => "1.14.13",
"requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: "^1.16.0", source: nil
file: "pubspec.yaml", groups: ["direct"], requirement: "^1.14.13", source: nil
}],
"version" => "1.16.0" }
]
Expand All @@ -142,7 +142,7 @@
# Dependabot lifts this from the original dependency.
"previous_version" => "0.0.0",
"requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: "^1.16.0", source: nil
file: "pubspec.yaml", groups: ["direct"], requirement: "^1.14.13", source: nil
}],
"version" => "1.16.0" }
]
Expand Down Expand Up @@ -269,42 +269,6 @@
]
end
end
context "app (version but publish_to: none)" do
let(:project) { "can_update_publish_to_none" }
it "can update" do
expect(can_update).to be_truthy
expect(updated_dependencies).to eq [
{ "name" => "retry",
"package_manager" => "pub",
"previous_requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: "^2.0.0", source: nil
}],
"previous_version" => "2.0.0",
"requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: "^3.1.0", source: nil
}],
"version" => "3.1.0" }
]
end
end
context "library (has version)" do
let(:project) { "can_update_library" }
it "can update" do
expect(can_update).to be_truthy
expect(updated_dependencies).to eq [
{ "name" => "retry",
"package_manager" => "pub",
"previous_requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: "^2.0.0", source: nil
}],
"previous_version" => "2.0.0",
"requirements" => [{
file: "pubspec.yaml", groups: ["direct"], requirement: ">=2.0.0 <4.0.0", source: nil
}],
"version" => "3.1.0" }
]
end
end
end
context "with bump_versions strategy" do
let(:requirements_update_strategy) { "bump_versions" }
Expand Down