Skip to content

Commit

Permalink
add testing of validades 'id's #244
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnatas committed Oct 17, 2016
1 parent cdd5551 commit 3a21d91
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The version numbers below try to follow the conventions at http://semver.org/.

## Unreleased

- Adding validades with presence uniqueness of ids
- Remove the repository's instance that has remained in the db
- Adding translation of the periodicity options in repository helper
- Fixing wrong configurations translation in portuguese navbar
Expand Down
1 change: 1 addition & 0 deletions spec/models/kalibro_configuration_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
describe 'validations' do
it { is_expected.to validate_presence_of(:kalibro_configuration_id) }
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_uniqueness_of(:kalibro_configuration_id)}
end

describe 'associations' do
Expand Down
1 change: 1 addition & 0 deletions spec/models/project_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
describe 'validations' do
it { is_expected.to validate_presence_of(:project_id) }
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_uniqueness_of(:project_id).scoped_to(:user_id) }
end

describe 'methods' do
Expand Down
1 change: 1 addition & 0 deletions spec/models/reading_group_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
describe ReadingGroupAttributes, :type => :model do
describe 'associations' do
it { is_expected.to belong_to(:user) }
it { is_expected.to validate_uniqueness_of(:reading_group_id)}
end
end
1 change: 1 addition & 0 deletions spec/models/repository_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
context 'validations' do
it { is_expected.to validate_presence_of(:repository_id) }
it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_uniqueness_of(:repository_id).scoped_to(:user_id) }
end

describe 'associations' do
Expand Down

0 comments on commit 3a21d91

Please sign in to comment.