diff options
author | Dmitry Ilvokhin <d@ilvokhin.com> | 2025-03-01 20:10:26 +0000 |
---|---|---|
committer | Dmitry Ilvokhin <d@ilvokhin.com> | 2025-03-02 21:58:24 +0000 |
commit | 96bcc15d6e3e820309c874fe39df11cb88b30af2 (patch) | |
tree | 1674002cc4378c5d077c0fe4ca239dd3c4ef9ab0 /flatbot_test.go | |
parent | 602dcb4ec617634d1fed182ac0309123992e43c6 (diff) | |
download | flatbot-96bcc15d6e3e820309c874fe39df11cb88b30af2.tar.gz flatbot-96bcc15d6e3e820309c874fe39df11cb88b30af2.tar.bz2 flatbot-96bcc15d6e3e820309c874fe39df11cb88b30af2.zip |
Split logic to multiple files
Diffstat (limited to 'flatbot_test.go')
-rw-r--r-- | flatbot_test.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/flatbot_test.go b/flatbot_test.go deleted file mode 100644 index 0308295..0000000 --- a/flatbot_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package main - -import ( - "os" - "reflect" - "testing" -) - -func TestParse(t *testing.T) { - filename := "htmls/2025-02-19-isle-of-dogs.html" - data, err := os.ReadFile(filename) - if err != nil { - t.Errorf("Could not read %v", filename) - } - want := []flat{ - flat{ - URL: "https://rightmove.co.uk/properties/156522206#", - Price: "£2,500", - }, - flat{ - URL: "https://rightmove.co.uk/properties/158462822#", - Price: "£3,000", - }, - flat{ - URL: "https://rightmove.co.uk/properties/157948184#", - Price: "£2,400", - }} - got, err := parse(data) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(want, got) { - t.Errorf("Parse failed: got: %v, want: %v", want, got) - } -} |