Skip to content

Instantly share code, notes, and snippets.

@tanelsuurhans
Created February 14, 2013 14:36
Show Gist options
  • Save tanelsuurhans/4953201 to your computer and use it in GitHub Desktop.
Save tanelsuurhans/4953201 to your computer and use it in GitHub Desktop.
describe "database" do
it "should have an unique index on confirmation_token" do
must have_db_index(:confirmation_token).unique(true)
end
it "should have an unique index on email" do
must have_db_index(:email).unique(true)
end
it "should have an unique index on reset_password_token" do
must have_db_index(:reset_password_token).unique(true)
end
it "should have an index on validated and application_id" do
must have_db_index([:validated, :application_id])
end
end
describe "database" do
it { must have_db_index(:confirmation_token).unique(true) }
it { must have_db_index(:email).unique(true) }
it { must have_db_index(:reset_password_token).unique(true) }
it { must have_db_index([:validated, :application_id]) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment