Skip to content

Commit

Permalink
test: expand test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
flexagoon committed Nov 3, 2023
1 parent edbf38e commit 0ac4feb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 0ac4feb

Please sign in to comment.