Skip to content

Commit

Permalink
Cover lookup where a value is set
Browse files Browse the repository at this point in the history
  • Loading branch information
jspc committed Oct 1, 2022
1 parent 263bbc7 commit 2f4f969
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"os"
"testing"
)

Expand All @@ -11,6 +12,15 @@ func TestLookup(t *testing.T) {
}
}

func TestLookup_Exists(t *testing.T) {
os.Setenv("__THIS_KEY_HAS_A_VALUE", "<3")

got := Lookup("__THIS_KEY_HAS_A_VALUE", "blahblahblah")
if got != "<3" {
t.Errorf("unexpected value %q", got)
}
}

func TestMustLookup(t *testing.T) {
defer func() {
err := recover()
Expand Down

0 comments on commit 2f4f969

Please sign in to comment.