Skip to content

Commit

Permalink
Adds test to cover get_value when key does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ghatighorias committed Jul 11, 2017
1 parent ce36a88 commit d1e0f87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/models/system_variable_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ defmodule CoursePlanner.SystemVariableTest do
end

describe "test the get_value" do
test "when key does not exist" do
assert Settings.get_value("TEST_KEY") == nil
end

test "when variable type is string" do
value = "random value"
insert(:system_variable, %{key: "TEST_KEY", value: value, type: "string"})
Expand Down

0 comments on commit d1e0f87

Please sign in to comment.