Skip to content

Commit

Permalink
Remove and update legacy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Oct 3, 2024
1 parent a3ac1ac commit d2cd4bc
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 380 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/_snaps/legacy_board.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@
board <- board_temp()
pin(mtcars, "mtcars", board = board)
Condition
Warning:
`pin()` was deprecated in pins 1.4.0.
i Please use `pin_write()` instead.
Error in `board_pin_create()`:
! Use `pin_write()` with this board, not `pin()`
Code
pin_get("mtcars", board = board)
Condition
Warning:
`pin_get()` was deprecated in pins 1.4.0.
i Please use `pin_read()` instead.
Error in `board_pin_get()`:
! Use `pin_read()` with this board, not `pin_get()`
Code
pin_find("mtcars", board = board)
Condition
Warning:
`pin_find()` was deprecated in pins 1.4.0.
i Please use `pin_search()` instead.
Error in `board_pin_find()`:
! Use `pin_search()` with this board, not `pin_find()`
Code
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/_snaps/legacy_local.md

This file was deleted.

25 changes: 0 additions & 25 deletions tests/testthat/_snaps/pin.md

This file was deleted.

3 changes: 3 additions & 0 deletions tests/testthat/_snaps/pin_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
board <- board_temp()
pin_info("mtcars", board = board)
Condition
Warning:
`pin_info()` was deprecated in pins 1.4.0.
i Please use `pin_meta()` instead.
Error in `pin_info()`:
! Use `pin_meta()` with this board, not `pin_info()`

37 changes: 0 additions & 37 deletions tests/testthat/test-legacy_azure.R

This file was deleted.

51 changes: 0 additions & 51 deletions tests/testthat/test-legacy_datatxt.R

This file was deleted.

25 changes: 0 additions & 25 deletions tests/testthat/test-legacy_gcloud.R

This file was deleted.

33 changes: 0 additions & 33 deletions tests/testthat/test-legacy_github.R

This file was deleted.

45 changes: 0 additions & 45 deletions tests/testthat/test-legacy_local.R

This file was deleted.

3 changes: 3 additions & 0 deletions tests/testthat/test-legacy_packages.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("can pin_find() package data", {
withr::local_options(lifecycle_verbosity = "quiet")
board <- board_packages()

results <- pin_find(board = board)
Expand All @@ -12,12 +13,14 @@ test_that("can pin_find() package data", {
})

test_that("can retrieve data from a package", {
withr::local_options(lifecycle_verbosity = "quiet")
board <- board_packages()
data <- pin_get("datasets/AirPassengers", board = board)
expect_equal(data, datasets::AirPassengers)
})

test_that("bad pin names give useful errors", {
withr::local_options(lifecycle_verbosity = "quiet")
board <- board_packages()

expect_snapshot(error = TRUE, {
Expand Down
37 changes: 0 additions & 37 deletions tests/testthat/test-legacy_s3.R

This file was deleted.

Loading

0 comments on commit d2cd4bc

Please sign in to comment.