-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from danielgrieve/master
Replace spaces in list name when defining schema modules
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
defmodule EctoGSS.SchemaTest do | ||
use ExUnit.Case, async: true | ||
|
||
defmodule Account do | ||
use EctoGSS.Schema, { | ||
:model, | ||
columns: ["A", "Y"], | ||
list: "All Accounts", | ||
spreadsheet: "1h85keViqbRzgTN245gEw5s9roxpaUtT7i-mNXQtT8qQ" | ||
} | ||
|
||
use Ecto.Schema | ||
|
||
schema "accounts" do | ||
field(:nickname, EctoGSS.Schema.AllAccounts.A) | ||
field(:email, EctoGSS.Schema.AllAccounts.Y) | ||
end | ||
end | ||
|
||
test "list names with spaces" do | ||
assert match?({:module, _}, Code.ensure_compiled(EctoGSS.Schema.AllAccounts.A)) | ||
end | ||
end |