(t *testing.T)
| 91 | } |
| 92 | |
| 93 | func TestProviderSignAndUpdate(t *testing.T) { |
| 94 | suite := setupTestSuite(t) |
| 95 | |
| 96 | owner := testutil.AccAddress(t) |
| 97 | auditor := testutil.AccAddress(t) |
| 98 | originAttr := testutil.Attributes(t) |
| 99 | |
| 100 | msg := &types.MsgSignProviderAttributes{ |
| 101 | Owner: owner.String(), |
| 102 | Auditor: auditor.String(), |
| 103 | Attributes: originAttr, |
| 104 | } |
| 105 | |
| 106 | res, err := suite.handler(suite.ctx, msg) |
| 107 | require.NotNil(t, res) |
| 108 | require.NoError(t, err) |
| 109 | |
| 110 | msg.Attributes = testutil.Attributes(t) |
| 111 | res, err = suite.handler(suite.ctx, msg) |
| 112 | require.NotNil(t, res) |
| 113 | require.NoError(t, err) |
| 114 | prov, exists := suite.keeper.GetProviderAttributes(suite.ctx, owner) |
| 115 | |
| 116 | msg.Attributes = append(msg.Attributes, originAttr...) |
| 117 | // add some more attributes. |
| 118 | // if part below starts to fail it is due to testutil.Attributes |
| 119 | // may produce same attributes between multiple calls to it |
| 120 | require.True(t, exists) |
| 121 | require.Equal(t, prov, msgSignProviderAttributesToResponse(msg)) |
| 122 | } |
| 123 | |
| 124 | func TestProviderDeleteNonExisting(t *testing.T) { |
| 125 | suite := setupTestSuite(t) |
nothing calls this directly
no test coverage detected