Add unit tests for main model parts #310

Merged
Plume_migration_agent merged 8 commits from tests into master 2018-11-24 11:44:18 +00:00

Add tests for following model parts:

  • Blog
  • Comment
  • Instance
  • Media
  • Post
  • User
Add tests for following model parts: - [x] Blog - [ ] Comment - [x] Instance - [x] Media - [ ] Post - [x] User
codecov[bot] commented 2018-11-07 20:29:41 +00:00 (Migrated from github.com)

Codecov Report

Merging #310 into master will increase coverage by 21.61%.
The diff coverage is 38.24%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #310       +/-   ##
===========================================
+ Coverage    5.05%   26.66%   +21.61%     
===========================================
  Files          55       55               
  Lines        3777     6138     +2361     
===========================================
+ Hits          191     1637     +1446     
- Misses       3586     4501      +915
Impacted Files Coverage Δ
plume-models/src/blog_authors.rs 100% <ø> (+100%) ⬆️
plume-models/src/admin.rs 0% <ø> (ø) ⬆️
plume-models/src/notifications.rs 0% <0%> (ø) ⬆️
plume-models/src/follows.rs 0% <0%> (ø) ⬆️
plume-models/src/headers.rs 0% <0%> (ø) ⬆️
src/inbox.rs 0% <0%> (ø) ⬆️
plume-common/src/activity_pub/mod.rs 0% <0%> (ø) ⬆️
plume-common/src/activity_pub/request.rs 0% <0%> (ø) ⬆️
plume-models/src/post_authors.rs 0% <0%> (ø) ⬆️
plume-models/src/mentions.rs 0% <0%> (ø) ⬆️
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b9727e...451bac0. Read the comment docs.

# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=h1) Report > Merging [#310](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/0b9727ed28873783f7d39f9a3308ff2d07fb2994?src=pr&el=desc) will **increase** coverage by `21.61%`. > The diff coverage is `38.24%`. [![Impacted file tree graph](https://codecov.io/gh/Plume-org/Plume/pull/310/graphs/tree.svg?width=650&token=sHtxmDuZ06&height=150&src=pr)](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #310 +/- ## =========================================== + Coverage 5.05% 26.66% +21.61% =========================================== Files 55 55 Lines 3777 6138 +2361 =========================================== + Hits 191 1637 +1446 - Misses 3586 4501 +915 ``` | [Impacted Files](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [plume-models/src/blog\_authors.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9ibG9nX2F1dGhvcnMucnM=) | `100% <ø> (+100%)` | :arrow_up: | | [plume-models/src/admin.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9hZG1pbi5ycw==) | `0% <ø> (ø)` | :arrow_up: | | [plume-models/src/notifications.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9ub3RpZmljYXRpb25zLnJz) | `0% <0%> (ø)` | :arrow_up: | | [plume-models/src/follows.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9mb2xsb3dzLnJz) | `0% <0%> (ø)` | :arrow_up: | | [plume-models/src/headers.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9oZWFkZXJzLnJz) | `0% <0%> (ø)` | :arrow_up: | | [src/inbox.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-c3JjL2luYm94LnJz) | `0% <0%> (ø)` | :arrow_up: | | [plume-common/src/activity\_pub/mod.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtY29tbW9uL3NyYy9hY3Rpdml0eV9wdWIvbW9kLnJz) | `0% <0%> (ø)` | :arrow_up: | | [plume-common/src/activity\_pub/request.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtY29tbW9uL3NyYy9hY3Rpdml0eV9wdWIvcmVxdWVzdC5ycw==) | `0% <0%> (ø)` | :arrow_up: | | [plume-models/src/post\_authors.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9wb3N0X2F1dGhvcnMucnM=) | `0% <0%> (ø)` | :arrow_up: | | [plume-models/src/mentions.rs](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree#diff-cGx1bWUtbW9kZWxzL3NyYy9tZW50aW9ucy5ycw==) | `0% <0%> (ø)` | :arrow_up: | | ... and [41 more](https://codecov.io/gh/Plume-org/Plume/pull/310/diff?src=pr&el=tree-more) | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=footer). Last update [0b9727e...451bac0](https://codecov.io/gh/Plume-org/Plume/pull/310?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Author
Owner

I think some part of the code should be refactored before going further. Database initialization is getting messier and messier because some things currently done in routes should be done in the model. I'll start again latter when those things will have moved

I think some part of the code should be refactored before going further. Database initialization is getting messier and messier because some things currently done in routes should be done in the model. I'll start again latter when those things will have moved
elegaanz (Migrated from github.com) approved these changes 2018-11-23 18:28:15 +00:00
elegaanz (Migrated from github.com) left a comment

Thanks a lot for writing all these tests!

Thanks a lot for writing all these tests!
Author
Owner

I've rebased to master to allow for merge

I've rebased to master to allow for merge
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#310
No description provided.