aboutsummaryrefslogtreecommitdiff
path: root/tools/mpd-stats/internal/scrobbler/record_test.go
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-24 17:32:17 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-24 17:32:17 -0700
commitfe7dfdd250b701177f051ad6cdc3dc68695cbfc4 (patch)
tree99d7cf0230ad604c256df2225c1d32ef4266d4ec /tools/mpd-stats/internal/scrobbler/record_test.go
parentfeat(home/packages): install git-broom (diff)
downloadinfra-fe7dfdd250b701177f051ad6cdc3dc68695cbfc4.tar.gz
ref(tools/mpd-stats): delete the project
It's been moved to its own repository at https://github.com/fcuny/mpd-stats Update the list of repositories managed by terraform.
Diffstat (limited to 'tools/mpd-stats/internal/scrobbler/record_test.go')
-rw-r--r--tools/mpd-stats/internal/scrobbler/record_test.go53
1 files changed, 0 insertions, 53 deletions
diff --git a/tools/mpd-stats/internal/scrobbler/record_test.go b/tools/mpd-stats/internal/scrobbler/record_test.go
deleted file mode 100644
index 3bf8554..0000000
--- a/tools/mpd-stats/internal/scrobbler/record_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package scrobbler
-
-import (
- "testing"
-
- "github.com/fhs/gompd/v2/mpd"
-)
-
-func TestNewRecord(t *testing.T) {
- song := mpd.Attrs{
- "Artist": "Nine Inch Nails",
- "Album": "The Downward Spiral",
- "Title": "Reptile",
- "duration": "411.00",
- }
-
- record, err := NewRecord(song)
- if err != nil {
- t.Errorf("NewRecord returned an error: %s", err)
- }
- if record == nil {
- t.Errorf("NewRecord returned nil record")
- }
-}
-
-func TestRecordEqualAttrs(t *testing.T) {
- s1 := mpd.Attrs{
- "Artist": "Nine Inch Nails",
- "Album": "The Downward Spiral",
- "Title": "Reptile",
- "duration": "411.00",
- }
-
- s2 := mpd.Attrs{
- "Artist": "Nine Inch Nails",
- "Album": "The Downward Spiral",
- "Title": "Closer",
- "duration": "373.00",
- }
-
- r, err := NewRecord(s1)
- if err != nil {
- t.Errorf("NewRecord returned an error: %s", err)
- }
-
- if !r.EqualAttrs(s1) {
- t.Errorf("EqualAttrs expected true got false")
- }
-
- if r.EqualAttrs(s2) {
- t.Errorf("EqualAttrs expected false got true")
- }
-}