Test case for #144

This commit is contained in:
Neale Pickett 2021-10-13 22:43:51 +00:00
parent d36c0da5bf
commit dd8ca81186
3 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased]
### Fixed
-
## [v4.2.2] - 2021-09-30
### Added
- `debug.notes` front matter field

View File

@ -57,7 +57,7 @@ func TestState(t *testing.T) {
teamName := "My Team"
if err := s.SetTeamName(teamID, teamName); err != nil {
t.Errorf("Setting team name: %w", err)
t.Errorf("Setting team name: %v", err)
}
if err := s.SetTeamName(teamID, "wat"); err == nil {
t.Errorf("Registering team a second time didn't fail")

View File

@ -32,6 +32,11 @@ func TestTheme(t *testing.T) {
t.Error("Timestamp compared wrong")
}
if f, _, err := s.Open("/foo/bar/index.html"); err == nil {
f.Close()
t.Error("Path is ignored")
}
if f, _, err := s.Open("nofile"); err == nil {
f.Close()
t.Error("Opening non-existent file didn't return an error")