| 111 | } |
| 112 | |
| 113 | func CreateTestScope(client *helper.DevlakeClient, config *FakeScopeConfig, connectionId uint64) *FakeProject { |
| 114 | scopes := helper.Cast[[]FakeProject](client.CreateScopes(PLUGIN_NAME, |
| 115 | connectionId, |
| 116 | FakeProject{ |
| 117 | Id: "p1", |
| 118 | Name: "Project 1", |
| 119 | ConnectionId: connectionId, |
| 120 | Url: "http://fake.org/api/project/p1", |
| 121 | ScopeConfigId: config.Id, |
| 122 | }, |
| 123 | )) |
| 124 | return &scopes[0] |
| 125 | } |
| 126 | |
| 127 | func CreateTestScopeConfig(client *helper.DevlakeClient, connectionId uint64) *FakeScopeConfig { |
| 128 | config := helper.Cast[FakeScopeConfig](client.CreateScopeConfig(PLUGIN_NAME, connectionId, FakeScopeConfig{ |