#794: fix for failed specs, refactoring

This commit is contained in:
Vokhmin Alexey V 2013-01-18 20:14:10 +04:00
parent b1606d9241
commit 26a37c2516
2 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ describe PullRequest do
FileUtils.rm_rf(APP_CONFIG['root_path'])
end
it { should belong_to(:issue) }
it { should belong_to(:issue).validate(true) }
it { should belong_to(:to_project) }
it { should belong_to(:from_project) }

View File

@ -27,10 +27,10 @@ describe Repository do
end
it { should belong_to(:platform) }
it { should have_many(:project_to_repositories)}
it { should have_many(:projects).through(:project_to_repositories)}
it { should have_many(:project_to_repositories).validate(true) }
it { should have_many(:projects).through(:project_to_repositories) }
it { should validate_presence_of(:name)}
it { should validate_presence_of(:name) }
it { should validate_uniqueness_of(:name).case_insensitive.scoped_to(:platform_id) }
it { should validate_format_of(:name).with('basic_repository-name-1234') }
it { should validate_format_of(:name).not_with('.!') }