Skip to content

Commit

Permalink
Wrote test cases for compound indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Thom Stahl committed Dec 17, 2011
1 parent 792808a commit 48bd0a3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions spec/models/indices_spec.rb
Expand Up @@ -54,6 +54,37 @@ class Student < Ampere::Model
}).should raise_error
end

it 'should enforce the uniqueness of unique single-field indices' do
pending
end

context 'compound indices' do
before :all do
class Professor < Ampere::Model
field :first_name
field :last_name
field :employee_id_number

index :employee_id_number
index [:first_name, :last_name]
end
end

###

it 'should define compound indices' do
pending
end

it 'should be able to search on both fields of a compound index' do
pending
end

it 'should still be able to search on just one field of a compound index' do
pending
end
end

###

after :all do
Expand Down
1 change: 1 addition & 0 deletions spec/models/relationships/belongs_to_spec.rb
Expand Up @@ -88,6 +88,7 @@ class Passenger < Ampere::Model
end

it 'sets belongs_to pointer for has_many relationship' do
pending
end

###
Expand Down
2 changes: 2 additions & 0 deletions spec/models/relationships/has_many_spec.rb
Expand Up @@ -54,9 +54,11 @@ class Passenger < Ampere::Model
end

it 'should be able to remove items from has_many relationships' do
pending
end

it 'should be able to query has_many relationships' do
pending
end

###
Expand Down
4 changes: 4 additions & 0 deletions spec/models/relationships/has_one_spec.rb
Expand Up @@ -58,6 +58,10 @@ class Engine < Ampere::Model
@car.engine.should be_nil
end

it 'can delete the object related to it in a has_one relationship' do
pending
end

###

after :all do
Expand Down

0 comments on commit 48bd0a3

Please sign in to comment.