Skip to content

Commit ef3cc1c

Browse files
Test fixes 9
1 parent f306c0f commit ef3cc1c

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

tmcrstudioaddin/tests/testthat/testHTTPQueries.R

+1-26
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ httptest::with_mock_API({
7676
if (file.exists(credentials_path)){
7777
file.remove(credentials_path)
7878
}
79-
8079
# authenticate("rtest", "asdasdasd", "https://tmc.mooc.fi")
81-
credentials_1 <- login("a", "b", "c", "d", "tmc.mooc.fi")
80+
credentials_1 <- login("a", "b", "c", "d", "tmc.mooc.fi")
8281
credentials_1$serverAddress <- "tmc.mooc.fi"
8382

8483
stub(get_all_organizations, "shiny::withProgress", withProgress_mocksi)
@@ -96,30 +95,6 @@ httptest::with_mock_API({
9695
}
9796
})
9897

99-
test_that("organizations are fetched from the server", {
100-
credentials_path <- paste(get_tmcr_directory(),
101-
".credentials.rds", sep = .Platform$file.sep)
102-
103-
if (file.exists(credentials_path)){
104-
file.remove(credentials_path)
105-
}
106-
107-
# authenticate("rtest", "asdasdasd", "https://tmc.mooc.fi")
108-
login("a", "b", "c", "d", "tmc.mooc.fi")
109-
110-
organizations <- tmcrstudioaddin::get_all_organizations()
111-
112-
expect_true(length(organizations$name) > 0)
113-
114-
for (organization in organizations$name){
115-
expect_true(is.character(organization))
116-
}
117-
118-
if (file.exists(credentials_path)){
119-
file.remove(credentials_path)
120-
}
121-
})
122-
12398
test_that("We can get submission details", {
12499
token <- "asd"
125100
url <- "https://tmc.mooc.fi/api/v8/core/submissions/1331386"

0 commit comments

Comments
 (0)