(t *testing.T)
| 837 | } |
| 838 | |
| 839 | func TestParsePushRevisionReportsMalformedSymbolicRef(t *testing.T) { |
| 840 | // Given Git returns a symbolic push ref outside refs/remotes |
| 841 | output := []byte("not/a/valid/remote/ref") |
| 842 | |
| 843 | // When the push revision is parsed |
| 844 | trackingRef, err := parsePushRevision(output) |
| 845 | |
| 846 | // Then the malformed ref is reported with context |
| 847 | require.EqualError(t, err, "could not parse push revision: remote tracking branch must have format refs/remotes/<remote>/<branch> but was: not/a/valid/remote/ref") |
| 848 | assert.Empty(t, trackingRef) |
| 849 | } |
| 850 | |
| 851 | func TestParseRemoteTrackingRef(t *testing.T) { |
| 852 | tests := []struct { |
nothing calls this directly
no test coverage detected