-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase coverage of project #934
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #934 +/- ##
===========================================
+ Coverage 91.16% 94.01% +2.85%
===========================================
Files 70 68 -2
Lines 973 969 -4
===========================================
+ Hits 887 911 +24
+ Misses 86 58 -28 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
…ial-projects/ZeroWaste into 930-increase-coverage-of-project
…ial-projects/ZeroWaste into 930-increase-coverage-of-project
@@ -0,0 +1,7 @@ | |||
FactoryBot.define do | |||
factory :authorization do | |||
uid { "unique_uid" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SecureHex.uid якось так
product.attributes = { | ||
prices_attributes: [ | ||
{ sum: 100 } | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NEVER use local vars in specs
before do | ||
sign_in user | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use shared context, it's already present
@@ -22,6 +22,14 @@ | |||
end | |||
end | |||
|
|||
context "redirect to root_url" do | |||
it "is successful" do | |||
get "/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use route helpers
describe "#perform!" do | ||
context "when preferable is set to 1" do | ||
it "updates other calculators to have preferable set to false" do | ||
service = Calculators::PreferableService.new(preferable: 1, slug: calculator1.slug) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same thing!
03a3caf
to
7d2dc81
Compare
dev #930
Code reviewers
Summary of issue
Increase coverage of project
Summary of change
Testing approach
Run coverage localy
CHECK LIST