package octokat

import (
	"github.com/bmizerany/assert"
	"os"
	"testing"
)

func TestRepositories(t *testing.T) {
	c := NewClient().WithToken(os.Getenv("GITHUB_TOKEN"))
	repo := Repo{"octokat", "jingweno"}

	repository, err := c.Repository(repo)
	assert.Equal(t, nil, err)
	assert.Equal(t, "octokat", repository.Name)
	assert.Equal(t, "jingweno", repository.Owner.Login)
}

package octokat

import (
	"github.com/bmizerany/assert"
	"os"
	"testing"
)

func TestRepositories(t *testing.T) {
	c := NewClient().WithToken(os.Getenv("GITHUB_TOKEN"))
	repo := Repo{"octokat", "jingweno"}

	repository, err := c.Repository(repo)
	assert.Equal(t, nil, err)
	assert.Equal(t, "octokat", repository.Name)
	assert.Equal(t, "jingweno", repository.Owner.Login)

	repo = Repo{"foo", "jingweno"}
	_, err = c.Repository(repo)
	assert.NotEqual(t, nil, err)
}

Add test case for repository not found
Add test case for repository not found
