Skip to content

Commit

Permalink
♻️ Refactor the Agile.SprintService
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreminiom committed Sep 17, 2022
1 parent 1043063 commit 18e72ad
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 98 deletions.
3 changes: 1 addition & 2 deletions jira/agile/api_client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"github.com/ctreminiom/go-atlassian/jira/agile/internal"
"github.com/ctreminiom/go-atlassian/pkg/infra/models"
"github.com/ctreminiom/go-atlassian/service/agile"
"github.com/ctreminiom/go-atlassian/service/common"
"io"
"io/ioutil"
Expand Down Expand Up @@ -65,7 +64,7 @@ type Client struct {
Auth common.Authentication
Board *internal.BoardService
Epic *internal.EpicService
Sprint agile.Sprint
Sprint *internal.SprintService
}

func (c *Client) NewFormRequest(ctx context.Context, method, apiEndpoint, contentType string, payload io.Reader) (*http.Request, error) {
Expand Down
7 changes: 3 additions & 4 deletions jira/agile/api_client_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"github.com/ctreminiom/go-atlassian/jira/agile/internal"
"github.com/ctreminiom/go-atlassian/pkg/infra/models"
"github.com/ctreminiom/go-atlassian/service/agile"
"github.com/ctreminiom/go-atlassian/service/common"
"github.com/ctreminiom/go-atlassian/service/mocks"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -44,7 +43,7 @@ func TestClient_Call(t *testing.T) {
Authentication common.Authentication
Board *internal.BoardService
Epic *internal.EpicService
Sprint agile.Sprint
Sprint *internal.SprintService
}

type args struct {
Expand Down Expand Up @@ -256,7 +255,7 @@ func TestClient_TransformTheHTTPResponse(t *testing.T) {
Authentication common.Authentication
Board *internal.BoardService
Epic *internal.EpicService
Sprint agile.Sprint
Sprint *internal.SprintService
}

type args struct {
Expand Down Expand Up @@ -336,7 +335,7 @@ func TestClient_TransformStructToReader(t *testing.T) {
Authentication common.Authentication
Board *internal.BoardService
Epic *internal.EpicService
Sprint agile.Sprint
Sprint *internal.SprintService
}

type args struct {
Expand Down
Loading

0 comments on commit 18e72ad

Please sign in to comment.