Skip to content

Commit

Permalink
tests: updated unit tests for options module
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 7632233ef09b0b5426f1af55e1b2905a62325670eb56b7a01a8e7a2bc40a8a70
  • Loading branch information
thindil committed Jan 17, 2024
1 parent f3a7475 commit 4dccebe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ suite "Unit tests for options module":

test "Adding a new option":
let optionName = "testOption"
setOption(optionName = optionName, value = initLimitedString(capacity = 3,
text = "200"), db = db)
setOption(optionName = optionName, value = "200", db = db)
check:
deleteOption(optionName, db) == QuitSuccess
getOption(optionName, db).len == 0

test "Updating an existing option":
setOption(optionName = "historyLength", value = initLimitedString(capacity = 3,
text = "100"), db = db)
setOption(optionName = "historyLength", value = "100", db = db)
check:
getOption("historyLength",
db) == "100"
Expand Down

0 comments on commit 4dccebe

Please sign in to comment.