diff options
| author | Teddy Wing | 2021-05-30 01:35:42 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-05-30 01:35:42 +0200 | 
| commit | f9d28c3f1cf032b4fc22acbea67d3adf35d5b6b9 (patch) | |
| tree | fa43e758167fa17da31a78b8e71dc0a4c9e7cfaa | |
| parent | d95b531c88f64ba6f920ad5b873e7ce61253a482 (diff) | |
| download | reflectub-f9d28c3f1cf032b4fc22acbea67d3adf35d5b6b9.tar.bz2 | |
main: Add test `Repo` data
Will be using this to implement the main logic.
| -rw-r--r-- | src/main.rs | 29 | 
1 files changed, 28 insertions, 1 deletions
| diff --git a/src/main.rs b/src/main.rs index 9734804..6326831 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,29 @@ async fn main() {      //     Path::new("/tmp/grsvp"),      // ).unwrap(); +    let test_repos = vec![ +        github::Repo { +            id: 18086664, +            name: "angular.js".to_owned(), +            description: None, +            fork: true, +            git_url: "git://github.com/teddywing/angular.js.git".to_owned(), +            default_branch: "master".to_owned(), +            updated_at: "2014-03-25T06:55:16Z".to_owned(), +        }, +        github::Repo { +            id: 312106271, +            name: "apple-developer-objc".to_owned(), +            description: Some( +                "A user script that forces Apple Developer documentation to use Objective-C".to_owned(), +            ), +            fork: false, +            git_url: "git://github.com/teddywing/apple-developer-objc.git".to_owned(), +            default_branch: "master".to_owned(), +            updated_at: "2020-11-11T22:49:53Z".to_owned(), +        }, +    ]; +      let mut db = database::Db::connect("test.db").await.unwrap();      // db.create().await.unwrap(); @@ -31,5 +54,9 @@ async fn main() {      //   Update updated_at      //   fetch -    dbg!(db.repo_get(2).await.unwrap()); +    for repo in test_repos { +        let r = db.repo_get(repo.id).await.unwrap(); + +        dbg!(r); +    }  } | 
