Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Remove tests for MultiMap MultiRead which shouldn't still be present
Browse files Browse the repository at this point in the history
  • Loading branch information
suhailpatel committed Mar 3, 2022
1 parent 1fe1507 commit 056f86f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
9 changes: 0 additions & 9 deletions mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,6 @@ func (s *MockSuite) TestMultiMapTableRead() {
s.Equal("Joe", u.Name)
}

func (s *MockSuite) TestMultiMapTableMultiRead() {
s.insertUsers()
var users []user
s.NoError(s.mmapTbl.MultiRead(1, []interface{}{1, 2}, &users).Run())
s.Len(users, 2)
s.Equal("Jane", users[0].Name)
s.Equal("Joe", users[1].Name)
}

func (s *MockSuite) TestMultiMapTableList() {
s.insertUsers()
var users []user
Expand Down
37 changes: 0 additions & 37 deletions multimap_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,43 +88,6 @@ func TestMultimapTableDelete(t *testing.T) {
}
}

func TestMultimapTableMultiRead(t *testing.T) {
tbl := ns.MultimapTable("customer93", "Tag", "Id", Customer2{})
createIf(tbl.(TableChanger), t)
joe := Customer2{
Id: "33",
Name: "Joe",
Tag: "A",
}
err := tbl.Set(joe).Run()
if err != nil {
t.Fatal(err)
}
jane := Customer2{
Id: "34",
Name: "Jane",
Tag: "A",
}
err = tbl.Set(jane).Run()
if err != nil {
t.Fatal(err)
}
customers := &[]Customer2{}
err = tbl.MultiRead("A", []interface{}{"33", "34"}, customers).Run()
if err != nil {
t.Fatal(err)
}
if len(*customers) != 2 {
t.Fatalf("Expected to multiread 2 records, got %d", len(*customers))
}
if !reflect.DeepEqual((*customers)[0], joe) {
t.Fatalf("Expected to find joe, got %v", (*customers)[0])
}
if !reflect.DeepEqual((*customers)[1], jane) {
t.Fatalf("Expected to find jane, got %v", (*customers)[1])
}
}

func TestMultimapTableMultiListOrder(t *testing.T) {
tbl := ns.MultimapTable("customer93", "Tag", "Id", Customer2{})
createIf(tbl.(TableChanger), t)
Expand Down

0 comments on commit 056f86f

Please sign in to comment.