MCPcopy Index your code
hub / github.com/coder/coder / Test_addStableSince

Function Test_addStableSince

scripts/release/main_internal_test.go:127–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

125}
126
127func Test_addStableSince(t *testing.T) {
128 t.Parallel()
129
130 date := time.Date(2024, time.April, 23, 0, 0, 0, 0, time.UTC)
131 body := "## Changelog"
132
133 want := "> ## Stable (since April 23, 2024)\n\n## Changelog"
134 got := addStableSince(date, body)
135
136 if diff := cmp.Diff(want, got); diff != "" {
137 require.Fail(t, "addStableSince() mismatch (-want +got):\n%s", diff)
138 }
139
140 // Test that it doesn't add twice.
141 got = addStableSince(date, got)
142
143 if diff := cmp.Diff(want, got); diff != "" {
144 require.Fail(t, "addStableSince() mismatch (-want +got):\n%s", diff, "addStableSince() should not add twice")
145 }
146}
147
148func Test_release_autoversion(t *testing.T) {
149 t.Parallel()

Callers

nothing calls this directly

Calls 2

addStableSinceFunction · 0.85
FailMethod · 0.45

Tested by

no test coverage detected