Skip to content

Commit

Permalink
Update for elixir 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Jan 5, 2017
1 parent 27f632f commit 1abfad6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
language: elixir
otp_release:
- 18.2
- 19.1
elixir:
- 1.3.2
- 1.2.6
- 1.3.4
- 1.4.0
before_script:
- export SCRIVENER_ECTO_DB_USER=postgres
- MIX_ENV=test mix db.reset
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ defmodule Scrivener.Ecto.Mixfile do
version: "1.2.0-dev",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
package: package,
package: package(),
description: "Paginate your Ecto queries with Scrivener",
deps: deps,
aliases: aliases,
deps: deps(),
aliases: aliases(),
docs: [
main: "readme",
extras: [
Expand Down
20 changes: 10 additions & 10 deletions test/scrivener/paginator/ecto/query_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do

describe "paginate" do
test "paginates an unconstrained query" do
create_posts
create_posts()

page = Post |> Scrivener.Ecto.Repo.paginate

Expand All @@ -48,7 +48,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "uses defaults from the repo" do
posts = create_posts
posts = create_posts()

page =
Post
Expand All @@ -63,7 +63,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "removes invalid clauses before counting total pages" do
posts = create_posts
posts = create_posts()

page =
Post
Expand All @@ -84,7 +84,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be provided the current page and page size as a params map" do
posts = create_posts
posts = create_posts()

page =
Post
Expand All @@ -98,7 +98,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be provided the current page and page size as options" do
posts = create_posts
posts = create_posts()

page =
Post
Expand All @@ -121,7 +121,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be used on a table with any primary key" do
create_key_values
create_key_values()

page =
KeyValue
Expand All @@ -133,7 +133,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be used with a group by clause" do
create_posts
create_posts()

page =
Post
Expand All @@ -145,7 +145,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be provided a Scrivener.Config directly" do
posts = create_posts
posts = create_posts()

config = %Scrivener.Config{
module: Scrivener.Ecto.Repo,
Expand All @@ -165,7 +165,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be provided a keyword directly" do
posts = create_posts
posts = create_posts()

page =
Post
Expand All @@ -179,7 +179,7 @@ defmodule Scrivener.Paginator.Ecto.QueryTest do
end

test "can be provided a map directly" do
posts = create_posts
posts = create_posts()

page =
Post
Expand Down
2 changes: 1 addition & 1 deletion test/support/comment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ defmodule Scrivener.Ecto.Comment do

belongs_to :post, Scrivener.Ecto.Post

timestamps
timestamps()
end
end

0 comments on commit 1abfad6

Please sign in to comment.