Running ‘testthat.R’ [4s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cde)
  > 
  > test_check("cde")
  trying URL 'http://environment.data.gov.uk/catchment-planning/RiverBasinDistrict/6/Action?format=csv'
  Content type 'application/octet-stream' length 6690 bytes
  ==================================================
  downloaded 6690 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/so/WaterBody/GB112071065700/objective-outcomes.csv?_view=csv'
  Content type 'text/csv' length 7557 bytes
  ==================================================
  downloaded 7557 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/outcome?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 61844 bytes (60 KB)
  ==================================================
  downloaded 60 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/so/WaterBody/GB520804714300/objective-outcomes.csv?_view=csv'
  downloaded 8500 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/OperationalCatchment/3108/outcome?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 43096 bytes (42 KB)
  ==================================================
  downloaded 42 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/WaterBody/GB112071065700/pa/csv'
  Content type 'application/octet-stream' length 361 bytes
  ==================================================
  downloaded 361 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/WaterBody/GB112071065700/pa/csv'
  Content type 'application/octet-stream' length 361 bytes
  ==================================================
  downloaded 361 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/reason-for-failure.csv?waterBody=GB112071065700&_view=csv'
  ── 1. Error: get_rnag returns a dataframe (as cde_df class) (@test-get_rnag.r#6)
  attempt to set an attribute on NULL
  Backtrace:
   1. cde::get_rnag("GB112071065700", "WBID")
   2. cde:::download_cde(ea_name, column, data_type = "rnag")
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3006/ReasonsForNotAchievingGood?item=all&format=csv'
  Content type 'application/octet-stream' length 4405 bytes
  ==================================================
  downloaded 4405 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3006/ReasonsForNotAchievingGood?item=all&format=csv'
  Content type 'application/octet-stream' length 4405 bytes
  ==================================================
  downloaded 4405 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/reason-for-failure.csv?waterBody=GB112071065700&_view=csv'
  ── 2. Error: specifying type for WB download returns a message (@test-get_rnag.r
  attempt to set an attribute on NULL
  Backtrace:
   1. testthat::expect_message(get_rnag("GB112071065700", "WBID", type = "River"))
   6. cde::get_rnag("GB112071065700", "WBID", type = "River")
   7. cde:::download_cde(ea_name, column, data_type = "rnag")
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/OperationalCatchment/3108/ReasonsForNotAchievingGood?item=all&format=csv'
  Content type 'application/octet-stream' length 455 bytes
  ==================================================
  downloaded 455 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/classification.csv?waterBody=GB520804714300&_view=csv'
  downloaded 113 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/OperationalCatchment/3249/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 871432 bytes (851 KB)
  ==================================================
  downloaded 851 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3006/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 195579 bytes (190 KB)
  ==================================================
  downloaded 190 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3006/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 195579 bytes (190 KB)
  ==================================================
  downloaded 190 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3006/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 195579 bytes (190 KB)
  ==================================================
  downloaded 190 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/classification.csv?waterBody=GB520804714300&_view=csv'
  downloaded 113 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/reason-for-failure.csv?waterBody=GB112071065700&_view=csv'
  Content type 'text/csv' length 1290 bytes
  ==================================================
  downloaded 1290 bytes
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 298538 bytes (291 KB)
  ==================================================
  downloaded 291 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/outcome?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 61844 bytes (60 KB)
  ==================================================
  downloaded 60 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/outcome?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 61844 bytes (60 KB)
  ==================================================
  downloaded 60 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/ManagementCatchment/3007/ReasonsForNotAchievingGood?item=all&format=csv'
  Content type 'application/octet-stream' length 10706 bytes (10 KB)
  ==================================================
  downloaded 10 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/RiverBasinDistrict/6/pa/csv'
  Content type 'application/octet-stream' length 10615 bytes (10 KB)
  ==================================================
  downloaded 10 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/RiverBasinDistrict/6/pa/csv'
  Content type 'application/octet-stream' length 10615 bytes (10 KB)
  ==================================================
  downloaded 10 KB
  
   river_basin_district management_catchment operational_catchment
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
                 Thames      Loddon and Trib                Loddon
  With an additional 1307 rows and 5 columns of data. 
  Row values may be truncated to fit console. 
  trying URL 'http://environment.data.gov.uk/catchment-planning/WaterBody/GB105033042920/pa/csv'
  Content type 'application/octet-stream' length 349 bytes
  ==================================================
  downloaded 349 bytes
  
   river_basin_district management_catchment operational_catchment
                Anglian     Cam and Ely Ouse                  Lark
                Anglian     Cam and Ely Ouse                  Lark
  With an additional 5 columns of data. 
  Row values may be truncated to fit console. 
  trying URL 'http://environment.data.gov.uk/catchment-planning/data/classification.csv?waterBody=GB520804714300&_view=csv'
  Content type 'text/csv' length 115753 bytes (113 KB)
  ==================================================
  downloaded 113 KB
  
  trying URL 'http://environment.data.gov.uk/catchment-planning/RiverBasinDistrict/6/classification?item=all&status=all&format=csv'
  Content type 'application/octet-stream' length 1856286 bytes (1.8 MB)
  ==================================================
  downloaded 1.8 MB
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 64 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: get_rnag returns a dataframe (as cde_df class) (@test-get_rnag.r#6) 
  2. Error: specifying type for WB download returns a message (@test-get_rnag.r#59) 
  
  Error: testthat unit tests failed
  Execution halted