Fixed small errors to functional test. I now have a minimal MVP, that works (at least according to the test ;))
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
c4b9a9470f
commit
d6324dfd4d
|
@ -30,6 +30,7 @@ fn should_print_current(context: &FunctionalTestContext) {
|
|||
String::from("name1"),
|
||||
"1".to_string(),
|
||||
"github".to_string(),
|
||||
"email@domain.tld".to_string(),
|
||||
&context.settings.database.get_connection(),
|
||||
);
|
||||
|
||||
|
@ -45,6 +46,7 @@ fn should_print_current(context: &FunctionalTestContext) {
|
|||
String::from("name2"),
|
||||
"1".to_string(),
|
||||
"github".to_string(),
|
||||
"email@domain.tld".to_string(),
|
||||
&context.settings.database.get_connection(),
|
||||
);
|
||||
|
||||
|
@ -60,6 +62,7 @@ fn should_print_current(context: &FunctionalTestContext) {
|
|||
String::from("name3"),
|
||||
"1".to_string(),
|
||||
"github".to_string(),
|
||||
"email@domain.tld".to_string(),
|
||||
&context.settings.database.get_connection(),
|
||||
);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ fn shoud_save_only_one_current(context: &FunctionalTestContext) {
|
|||
String::from("github"),
|
||||
String::from("name"),
|
||||
String::from("1"),
|
||||
String::from("email@domain.tld"),
|
||||
];
|
||||
|
||||
insert_origin(
|
||||
|
@ -62,6 +63,7 @@ fn shoud_update_on_second_insert(context: &FunctionalTestContext) {
|
|||
String::from("github"),
|
||||
String::from("name"),
|
||||
String::from("1"),
|
||||
String::from("email@domain.tld"),
|
||||
];
|
||||
|
||||
insert_origin(
|
||||
|
@ -104,6 +106,7 @@ fn shoud_update_on_second_insert(context: &FunctionalTestContext) {
|
|||
String::from("github"),
|
||||
String::from("name"),
|
||||
String::from("2"),
|
||||
String::from("email@domain.tld"),
|
||||
];
|
||||
let application = Application::new(&settings, &console, &fake_notification, parser, arguments);
|
||||
application.run();
|
||||
|
@ -132,6 +135,7 @@ fn should_route_to_current(context: &FunctionalTestContext) {
|
|||
String::from("github"),
|
||||
String::from("name"),
|
||||
String::from("1"),
|
||||
String::from("email@domain.tld"),
|
||||
];
|
||||
let application = Application::new(
|
||||
&context.settings,
|
||||
|
|
|
@ -12,7 +12,7 @@ use test_utilities::{insert_current, insert_origin};
|
|||
#[test_context(FunctionalTestContext)]
|
||||
#[test]
|
||||
#[serial]
|
||||
fn should_make_request(context: &FunctionalTestContext) {
|
||||
fn should_make_request_gets_version_without_v_from_github(context: &FunctionalTestContext) {
|
||||
let parser = ArgumentParser {};
|
||||
let arguments = vec![String::from("release_checker"), String::from("request")];
|
||||
|
||||
|
@ -26,7 +26,7 @@ fn should_make_request(context: &FunctionalTestContext) {
|
|||
|
||||
insert_current(
|
||||
String::from("name1"),
|
||||
"1".to_string(),
|
||||
"1.2.3".to_string(),
|
||||
"github".to_string(),
|
||||
"email@domain.tld".to_string(),
|
||||
&context.settings.database.get_connection(),
|
||||
|
@ -41,7 +41,7 @@ fn should_make_request(context: &FunctionalTestContext) {
|
|||
.path("/repos/owner_name/repo_name/releases/latest");
|
||||
then.status(200)
|
||||
.header("content-type", "application/json")
|
||||
.body("{\"tag_name\":\"tag_name\",\"name\":\"name\"}"); // TODO: this a really simple return that just returns what i want. It should contain the full json blob that /releases returns
|
||||
.body("{\"tag_name\":\"1.2.3\",\"name\":\"name\"}"); // TODO: this a really simple return that just returns what i want. It should contain the full json blob that /releases returns
|
||||
});
|
||||
|
||||
let application = Application::new(
|
||||
|
|
Loading…
Reference in New Issue