mirror of
https://github.com/agersant/polaris
synced 2024-11-10 10:14:12 +00:00
Added preferences API test
This commit is contained in:
parent
42522ffc78
commit
7e46c6cd5a
2 changed files with 10 additions and 2 deletions
|
@ -24,7 +24,7 @@ pub struct MiscSettings {
|
|||
pub prefix_url: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Preferences {
|
||||
pub lastfm_username: Option<String>,
|
||||
pub web_theme_base: Option<String>,
|
||||
|
|
|
@ -225,7 +225,15 @@ fn test_service_settings() {
|
|||
|
||||
#[test]
|
||||
fn test_service_preferences() {
|
||||
// TODO
|
||||
let mut service = ServiceType::new(&format!("{}{}", TEST_DB_PREFIX, line!()));
|
||||
service.complete_initial_setup();
|
||||
service.login();
|
||||
let response = service.get("/api/preferences");
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
|
||||
let preferences = config::Preferences::default();
|
||||
let response = service.put_json("/api/preferences", &preferences);
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue