From f57489ed923651478498a667fc3d0ec2f3a16572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Sat, 2 Nov 2019 21:05:27 -0500 Subject: [PATCH] get command tests already present and move to their own. --- tests/commands_test.rs | 74 ------------------------------------------ 1 file changed, 74 deletions(-) diff --git a/tests/commands_test.rs b/tests/commands_test.rs index 87e1182b10..1c456b52c7 100644 --- a/tests/commands_test.rs +++ b/tests/commands_test.rs @@ -166,80 +166,6 @@ fn last_gets_last_row_when_no_amount_given() { }) } -#[test] -fn get() { - Playground::setup("get_test_1", |dirs, sandbox| { - sandbox.with_files(vec![FileWithContent( - "sample.toml", - r#" - nu_party_venue = "zion" - "#, - )]); - - let actual = nu!( - cwd: dirs.test(), h::pipeline( - r#" - open sample.toml - | get nu_party_venue - | echo $it - "# - )); - - assert_eq!(actual, "zion"); - }) -} - -#[test] -fn get_more_than_one_member() { - Playground::setup("get_test_2", |dirs, sandbox| { - sandbox.with_files(vec![FileWithContent( - "sample.toml", - r#" - [[fortune_tellers]] - name = "Andrés N. Robalino" - arepas = 1 - broken_builds = 0 - - [[fortune_tellers]] - name = "Jonathan Turner" - arepas = 1 - broken_builds = 1 - - [[fortune_tellers]] - name = "Yehuda Katz" - arepas = 1 - broken_builds = 1 - "#, - )]); - - let actual = nu!( - cwd: dirs.test(), h::pipeline( - r#" - open sample.toml - | get fortune_tellers - | get arepas broken_builds - | sum - | echo $it - "# - )); - - assert_eq!(actual, "5"); - }) -} - -#[test] -fn get_requires_at_least_one_member() { - Playground::setup("first_test_3", |dirs, sandbox| { - sandbox.with_files(vec![EmptyFile("andres.txt")]); - - let actual = nu_error!( - cwd: dirs.test(), "ls | get" - ); - - assert!(actual.contains("requires member parameter")); - }) -} - #[test] fn lines() { let actual = nu!(