Skip to content

Commit

Permalink
Merge 7003935 into d09f115
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronklaassen committed Aug 1, 2018
2 parents d09f115 + 7003935 commit 1963ed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/unsplash/photo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def search(query, page = 1, per_page = 10, orientation = nil)
page: page,
per_page: per_page,
orientation: orientation
}
}.compact
Unsplash::Search.search("/search/photos", self, params)
end

Expand Down
8 changes: 4 additions & 4 deletions spec/lib/photo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@

expect(@photos).to be_an Unsplash::SearchResult
expect(@photos.size).to eq 10
expect(@photos.total).to eq 1001
expect(@photos.total_pages).to eq 101
expect(@photos.total).to eq 541
expect(@photos.total_pages).to eq 55
end

it "returns a SearchResult of Photos with number of elements per page defined" do
Expand All @@ -141,8 +141,8 @@

expect(@photos).to be_an Unsplash::SearchResult
expect(@photos.size).to eq 3
expect(@photos.total).to eq 1001
expect(@photos.total_pages).to eq 334
expect(@photos.total).to eq 541
expect(@photos.total_pages).to eq 181
end

it "returns a SearchResult of Photos with orientation parameter" do
Expand Down

0 comments on commit 1963ed7

Please sign in to comment.