Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeDawkins committed Dec 2, 2020
1 parent c317e22 commit b1c46bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/command/graph/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ mod tests {
#[test]
fn get_schema_from_file_path_loads() {
let temp_dir = TempDir::new().unwrap();
let file_path = temp_dir.path().join("schema.graphql");
let file_path = "./schema.graphql";
let mut temp_file = File::create(file_path.clone()).unwrap();
write!(temp_file, "type Query {{ hello: String! }}").unwrap();

Expand All @@ -112,7 +112,7 @@ mod tests {

#[test]
fn get_schema_from_file_path_errs_on_bad_path() {
let empty_path = std::path::PathBuf::new().join("wow.graphql");
let empty_path = "./wow.graphql";
let schema = get_schema_from_file_path(&empty_path);
assert_eq!(schema.is_err(), true);
}
Expand Down
4 changes: 2 additions & 2 deletions src/command/subgraph/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ mod tests {
#[test]
fn get_schema_from_file_path_loads() {
let temp_dir = TempDir::new().unwrap();
let file_path = temp_dir.path().join("schema.graphql");
let file_path = "./schema.graphql";
let mut temp_file = File::create(file_path.clone()).unwrap();
write!(temp_file, "type Query {{ hello: String! }}").unwrap();

Expand All @@ -145,7 +145,7 @@ mod tests {

#[test]
fn get_schema_from_file_path_errs_on_bad_path() {
let empty_path = std::path::PathBuf::new().join("wow.graphql");
let empty_path = "./wow.graphql";
let schema = get_schema_from_file_path(&empty_path);
assert_eq!(schema.is_err(), true);
}
Expand Down

0 comments on commit b1c46bc

Please sign in to comment.