Browse Source

Allow for presence/non-presence of index page

A dev might have or might not have built the frontend. If he did not, a get request to `/` will result in a `HTTP::404`. If he did, the containing `index.html` will be returned leading to a `HTTP::200`.
fix-bad-api-calls
Philipp Hoenisch 3 years ago
parent
commit
759d0688e2
No known key found for this signature in database GPG Key ID: E5F8E74C672BC666
  1. 5
      daemon/src/routes_maker.rs

5
daemon/src/routes_maker.rs

@ -207,8 +207,9 @@ mod tests {
assert_eq!(feed_response.status(), Status::Ok);
assert_eq!(new_sell_order_response.status(), Status::Accepted);
assert_eq!(index_response.status(), Status::NotFound); // we don't embed the files in the
// tests
assert!(
index_response.status() == Status::NotFound || index_response.status() == Status::Ok
);
}
/// Constructs a Rocket instance for testing.

Loading…
Cancel
Save