SonuBardai / lockbox

L🦀CKBOX: Lockbox is a command-line tool built in rust for generating and managing passwords. It uses strong encryption algorithms to securely store your passwords, so you can be sure that your data is safe.
https://crates.io/crates/lock_box
MIT License
21 stars 10 forks source link

Write tests for all commands and refactor code to make it more testable #50

Closed SonuBardai closed 1 year ago

SonuBardai commented 1 year ago

Addresses https://github.com/SonuBardai/lockbox/issues/47

Write tests for commands:

codecov-commenter commented 1 year ago

Codecov Report

Merging #50 (1450de2) into main (5a5a131) will increase coverage by 23.42%. The diff coverage is 51.91%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##             main      #50       +/-   ##
===========================================
+ Coverage   43.89%   67.31%   +23.42%     
===========================================
  Files           8        8               
  Lines         843      970      +127     
===========================================
+ Hits          370      653      +283     
+ Misses        473      317      -156     
Files Changed Coverage Δ
src/cli/args.rs 89.89% <ø> (ø)
src/main.rs 0.00% <0.00%> (ø)
src/repl/mod.rs 0.00% <0.00%> (ø)
src/pass/mod.rs 77.00% <62.85%> (+49.09%) :arrow_up:
src/cli/commands.rs 89.14% <86.48%> (+89.14%) :arrow_up:
src/store/mod.rs 98.16% <96.87%> (+23.69%) :arrow_up: