Skip to content

Commit

Permalink
Update the testsuite...
Browse files Browse the repository at this point in the history
now tests:
  * creating .env
  * migrating
  * creating admin
  * login
  * listing links
  * creating links
  * filtering links
  • Loading branch information
enaut committed Jul 13, 2021
1 parent 9708d03 commit 64d9448
Show file tree
Hide file tree
Showing 5 changed files with 282 additions and 128 deletions.
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pslink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ predicates = "2.0.0"


[dev-dependencies.reqwest]
features = ["cookies"]
features = ["cookies", "json"]
version = "0.10.10"
4 changes: 3 additions & 1 deletion pslink/src/bin/pslink/views.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ pub async fn process_login_json(
Ok(HttpResponse::Ok().json2(&u))
} else {
info!("Invalid password for user: {}", &u.username);
Ok(redirect_builder("/admin/login/"))
Ok(HttpResponse::Unauthorized().json2(&Status::Error(Message {
message: "Failed to Login".to_string(),
})))
}
} else {
// should fail earlier if secret is missing.
Expand Down
6 changes: 1 addition & 5 deletions pslink/static/wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
app_bg.wasm
app_bg.wasm.d.ts
app.d.ts
app.js
package.json
*
Loading

0 comments on commit 64d9448

Please sign in to comment.