From b45d0b6324d1ec9212a3fc7d52b39e2e07e43d18 Mon Sep 17 00:00:00 2001 From: Bill Denney Date: Wed, 6 Feb 2019 20:59:35 -0500 Subject: [PATCH] Test that assignment keeps the correct class --- tests/testthat/test-xpose_data.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testthat/test-xpose_data.R b/tests/testthat/test-xpose_data.R index e95ef8e2..4e73b504 100644 --- a/tests/testthat/test-xpose_data.R +++ b/tests/testthat/test-xpose_data.R @@ -90,3 +90,8 @@ test_that('properly handles errors in files', { expect_error(grd_vs_iteration(xpdb_5), regex = 'No `files` slot could be found in this xpdb') }) +test_that('Allow assignment within object while maintaining the class', { + xpdb <- xpdb_ex_pk + xpdb$options$quiet <- TRUE + expect_equal(class(xpdb), class(xpdb_ex_pk)) +})