-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove unused code * Test vendored_pin_for
- Loading branch information
1 parent
4478efd
commit 4d02a20
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,10 +35,6 @@ def code() "200" end | |
end | ||
|
||
test "failed request with mock" do | ||
response = Class.new do | ||
def code() "500" end | ||
end.new | ||
|
||
Net::HTTP.stub(:post, proc { raise "Unexpected Error" }) do | ||
assert_raises(Importmap::Packager::HTTPError) do | ||
@packager.import("[email protected]") | ||
|
@@ -54,4 +50,9 @@ def code() "500" end | |
test "pin_for" do | ||
assert_equal %(pin "react", to: "https://cdn/react"), @packager.pin_for("react", "https://cdn/react") | ||
end | ||
|
||
test "vendored_pin_for" do | ||
assert_equal %(pin "react" # @17.0.2), @packager.vendored_pin_for("react", "https://cdn/[email protected]") | ||
assert_equal %(pin "javascript/react", to: "javascript--react.js" # @17.0.2), @packager.vendored_pin_for("javascript/react", "https://cdn/[email protected]") | ||
end | ||
end |