mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 04:51:47 +00:00
Write tests and ensure adding instances works
This commit is contained in:
parent
51dcfbab75
commit
85e30cc968
9 changed files with 227 additions and 49 deletions
|
|
@ -2,7 +2,7 @@ use std::fs;
|
|||
|
||||
use insta::assert_yaml_snapshot;
|
||||
|
||||
use crate::serve_util::{run_serve_test, InternAndRedact};
|
||||
use crate::{internable::InternAndRedact, serve_util::run_serve_test};
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
|
|
@ -39,7 +39,7 @@ fn scripts() {
|
|||
let subscribe_response = session.get_api_subscribe(0).unwrap();
|
||||
assert_yaml_snapshot!(
|
||||
"scripts_subscribe",
|
||||
redactions.redacted_yaml(subscribe_response)
|
||||
subscribe_response.intern_and_redact(&mut redactions, ())
|
||||
);
|
||||
|
||||
let read_response = session.get_api_read(root_id).unwrap();
|
||||
|
|
@ -70,9 +70,7 @@ fn just_txt() {
|
|||
});
|
||||
}
|
||||
|
||||
// TODO: Rojo doesn't currently handle files/folders being added.
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn add_folder() {
|
||||
run_serve_test("add_folder", |session, mut redactions| {
|
||||
let info = session.get_api_rojo().unwrap();
|
||||
|
|
@ -91,7 +89,7 @@ fn add_folder() {
|
|||
let subscribe_response = session.get_api_subscribe(0).unwrap();
|
||||
assert_yaml_snapshot!(
|
||||
"add_folder_subscribe",
|
||||
redactions.redacted_yaml(subscribe_response)
|
||||
subscribe_response.intern_and_redact(&mut redactions, ())
|
||||
);
|
||||
|
||||
let read_response = session.get_api_read(root_id).unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue