MCPcopy
hub / github.com/rubenv/sql-migrate / TestDownAll

Method TestDownAll

toapply_test.go:67–79  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

65}
66
67func (*ToApplyMigrateSuite) TestDownAll(c *C) {
68 toApply := ToApply(toapplyMigrations, "efg", Down)
69 c.Assert(toApply, HasLen, 3)
70 c.Assert(toApply[0], Equals, toapplyMigrations[2])
71 c.Assert(toApply[1], Equals, toapplyMigrations[1])
72 c.Assert(toApply[2], Equals, toapplyMigrations[0])
73
74 toApply = ToApply(toapplyMigrations, "zzz", Down)
75 c.Assert(toApply, HasLen, 3)
76 c.Assert(toApply[0], Equals, toapplyMigrations[2])
77 c.Assert(toApply[1], Equals, toapplyMigrations[1])
78 c.Assert(toApply[2], Equals, toapplyMigrations[0])
79}
80
81func (*ToApplyMigrateSuite) TestAlphaNumericMigrations(c *C) {
82 migrations := byId([]*Migration{

Callers

nothing calls this directly

Calls 1

ToApplyFunction · 0.85

Tested by

no test coverage detected