Skip to content

Tests for order model and schema#482

Open
Jeshan7 wants to merge 1 commit intodevelopfrom
order_model_and_schema_tests
Open

Tests for order model and schema#482
Jeshan7 wants to merge 1 commit intodevelopfrom
order_model_and_schema_tests

Conversation

@Jeshan7
Copy link
Contributor

@Jeshan7 Jeshan7 commented Mar 8, 2019

Why?

Coverage was less for order's model as well as for its schema.

This change addresses the need by:

Added test cases to increase the coverage.
In order_test.exs(model)

  • Test cases added for delete/1, get/1, get_all/0 , user_order/1 and get_all_with_preloads/1
    Added a test case for checking uniqueness of user_id in order_test.exs(schema)

[delivers #164457764]

Checklist

  • I have read CONTRIBUTING.md.
  • My code follows the style guidelines of this project.
  • I have commented on my code, particularly in hard-to-understand areas.
  • My code does not generate any (new) credo and compile-time warnings.
  • I have updated the documentation wherever necessary.
  • I have added tests to cover my changes.

Prior to this change,
 Coverage was less for order's model as well as for its schema.

This change
 Added test cases to increase the coverage.
  In order_test.exs(model)
  - Test cases added for delete/1, get/1, get_all/0 , user_order/1 and get_all_with_preloads/1
  Added a test case for checking uniqueness of user_id in order_test.exs(schema)
@codecov
Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #482 into develop will increase coverage by 0.45%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #482      +/-   ##
==========================================
+ Coverage    80.25%   80.7%   +0.45%     
==========================================
  Files          176     176              
  Lines         2218    2218              
==========================================
+ Hits          1780    1790      +10     
+ Misses         438     428      -10
Impacted Files Coverage Δ
apps/snitch_core/lib/core/data/schema/order.ex 100% <0%> (+13.33%) ⬆️
apps/snitch_core/lib/core/data/model/order.ex 100% <0%> (+42.1%) ⬆️

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 54d264f...11a09e9. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant