MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_PublicAPI_ResolvePullRequest_NoSources

Function TestSpec_PublicAPI_ResolvePullRequest_NoSources

pkg/intent/spec_test.go:156–167  ·  view source on GitHub ↗

TestSpec_PublicAPI_ResolvePullRequest_NoSources validates that no supported sources produces an unlinked attribution. Spec: "No supported sources — returns an AttributionUnlinked record."

(t *testing.T)

Source from the content-addressed store, hash-verified

154// sources produces an unlinked attribution.
155// Spec: "No supported sources — returns an AttributionUnlinked record."
156func TestSpec_PublicAPI_ResolvePullRequest_NoSources(t *testing.T) {
157 resolver := intent.Resolver{}
158
159 record := resolver.ResolvePullRequest(intent.PullRequestData{})
160
161 assert.Equal(t, intent.AttributionUnlinked, record.Status,
162 "no sources should produce unlinked status")
163 assert.Equal(t, intent.SourceNone, record.Source,
164 "no sources should produce none source")
165 assert.Equal(t, "no_supported_intent_source", record.Rule,
166 "no sources should produce no_supported_intent_source rule")
167}
168
169// TestSpec_PublicAPI_ResolveIssue_Mapped validates that an issue with matching
170// labels produces a mapped intent record.

Callers

nothing calls this directly

Calls 1

ResolvePullRequestMethod · 0.95

Tested by

no test coverage detected