tests/testthat/test-id_import.R

id_df_basic <- data.frame(
    peptides = c('AAA', 'AA'),
    proteins = c('Protein_1', 'Protein_1, Protein_2')
)

cols_list <- list(peptides = 'peptides',
                  proteins = 'proteins')

test_that("Import from a data frame works", {
    try_import <- import_identifications(id_df_basic, cols_list)
    expect_equivalent(try_import, id_df_basic)
    expect_is(try_import, "shared_peptides_identifications")
})
mstaniak/SharedPeptides documentation built on Jan. 21, 2020, 7:29 p.m.