From 0ac4feb42af28edcbfe9a4a39427fc26d2eb864d Mon Sep 17 00:00:00 2001 From: flexagoon Date: Fri, 3 Nov 2023 11:22:23 +0300 Subject: [PATCH] test: expand test coverage --- test/runtests.jl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index fa4a02c..8182d29 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,19 @@ -using GoogleDrive: google_download, drive_download_url +using GoogleDrive using Test @testset "GoogleDrive.jl" begin - src = "https://drive.google.com/file/d/XYZ" dst = "https://docs.google.com/uc?export=download&id=XYZ" - @test drive_download_url(src) == dst - @test drive_download_url(dst) == dst - @test_throws ArgumentError google_download("foo", IOBuffer()) + @test google_download_url("https://drive.google.com/file/d/XYZ") == dst + @test google_download_url("https://drive.google.com/file/d/XYZ/view") == dst + @test google_download_url(dst) == dst + + src = "https://docs.google.com/spreadsheets/d/XYZ/edit" + dst = "https://docs.google.com/spreadsheets/d/XYZ/export?format=" + @test google_download_url(src) == dst * "csv" + @test google_download_url(src, "xlsx") == dst * "xlsx" + + @test_throws ArgumentError google_download_url("foo") #= The following test reads a small Julia file from GoogleDrive.