TestHandlePMUpdate_Winget verifies that handlePMUpdate prints correct instructions for winget-managed installations.
(t *testing.T)
| 55 | // TestHandlePMUpdate_Winget verifies that handlePMUpdate prints correct |
| 56 | // instructions for winget-managed installations. |
| 57 | func TestHandlePMUpdate_Winget(t *testing.T) { |
| 58 | res := updatepolicy.Result{ |
| 59 | CurrentVersion: "1.0.0", |
| 60 | LatestVersion: "2.0.0", |
| 61 | } |
| 62 | binPath := "C:\\Program Files\\WindowsApps\\Thunder.tnr\\tnr.exe" |
| 63 | |
| 64 | err := handlePMUpdate(res, binPath) |
| 65 | assert.Error(t, err) |
| 66 | assert.Contains(t, err.Error(), "package manager") |
| 67 | } |
| 68 | |
| 69 | // TestHandlePMUpdate_Unknown verifies that handlePMUpdate prints generic |
| 70 | // instructions for unknown package manager installations. |
nothing calls this directly
no test coverage detected