Skip to content

Commit

Permalink
Fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed May 28, 2016
1 parent 3958cb7 commit 8df1834
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion trending.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (t *Trending) GetProjects(time, language string) ([]Project, error) {
// GetLanguages will return a slice of Language known by gitub.
// With the Language.URLName you can filter your GetProjects / GetDevelopers calls.
func (t *Trending) GetLanguages() ([]Language, error) {
return t.generateLanguages("div.select-menu-item a")
return t.generateLanguages("div.one-fourth div.select-menu a")
}

// GetTrendingLanguages will return a slice of Language that are currently trending.
Expand Down
8 changes: 4 additions & 4 deletions trending_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func ExampleTrending_GetProjects() {
}

if len(projects) > 0 && onlyGoProjects == true {
fmt.Println("Projects (filtered by Go) recieved.")
fmt.Println("Projects (filtered by Go) received.")
} else {
fmt.Printf("Number of projectes received: %d (filtered by golang %v)", len(projects), onlyGoProjects)
}
Expand All @@ -38,7 +38,7 @@ func ExampleTrending_GetLanguages() {

// We need more as 15 languages, because 9 are trending languages
if len(languages) > 15 {
fmt.Println("Languages recieved.")
fmt.Println("Languages received.")
} else {
fmt.Printf("Number of languages received: %d", len(languages))
}
Expand All @@ -54,7 +54,7 @@ func ExampleTrending_GetDevelopers() {
}

if len(developers) > 0 {
fmt.Println("Developers recieved.")
fmt.Println("Developers received.")
} else {
fmt.Printf("Number of developer received: %d", len(developers))
}
Expand All @@ -70,7 +70,7 @@ func ExampleTrending_GetTrendingLanguages() {
}

if len(languages) > 0 {
fmt.Println("Trending Languages recieved.")
fmt.Println("Trending Languages received.")
} else {
fmt.Printf("Number of languages received: %d", len(languages))
}
Expand Down

0 comments on commit 8df1834

Please sign in to comment.