You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-scm/scm/driver/stash/org_test.go

37 lines
1.0 KiB
Go

// Copyright 2017 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stash
import (
"context"
"testing"
"git.awesome-for.me/liuzhiguo/go-scm/scm"
)
func TestOrganizationFind(t *testing.T) {
client, _ := New("https://api.bitbucket.org")
_, _, err := client.Organizations.Find(context.Background(), "atlassian")
if err != scm.ErrNotSupported {
t.Errorf("Expect Not Supported error")
}
}
func TestOrganizationFindMembership(t *testing.T) {
client, _ := New("https://api.bitbucket.org")
_, _, err := client.Organizations.FindMembership(context.Background(), "atlassian", "janecitizen")
if err != scm.ErrNotSupported {
t.Errorf("Expect Not Supported error")
}
}
func TestOrganizationList(t *testing.T) {
client, _ := New("https://api.bitbucket.org")
_, _, err := client.Organizations.List(context.Background(), scm.ListOptions{Size: 30, Page: 1})
if err != scm.ErrNotSupported {
t.Errorf("Expect Not Supported error")
}
}