Commit 9b912362 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix spec not_to syntax for package models

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent af4a4ef0
...@@ -11,20 +11,20 @@ RSpec.describe Packages::MavenMetadatum, type: :model do ...@@ -11,20 +11,20 @@ RSpec.describe Packages::MavenMetadatum, type: :model do
describe '#app_name' do describe '#app_name' do
it { is_expected.to allow_value("my-app").for(:app_name) } it { is_expected.to allow_value("my-app").for(:app_name) }
it { is_expected.to_not allow_value("my/app").for(:app_name) } it { is_expected.not_to allow_value("my/app").for(:app_name) }
it { is_expected.to_not allow_value("my(app)").for(:app_name) } it { is_expected.not_to allow_value("my(app)").for(:app_name) }
end end
describe '#app_group' do describe '#app_group' do
it { is_expected.to allow_value("my.domain.com").for(:app_group) } it { is_expected.to allow_value("my.domain.com").for(:app_group) }
it { is_expected.to_not allow_value("my/domain/com").for(:app_group) } it { is_expected.not_to allow_value("my/domain/com").for(:app_group) }
it { is_expected.to_not allow_value("my(domain)").for(:app_group) } it { is_expected.not_to allow_value("my(domain)").for(:app_group) }
end end
describe '#path' do describe '#path' do
it { is_expected.to allow_value("my/domain/com/my-app").for(:path) } it { is_expected.to allow_value("my/domain/com/my-app").for(:path) }
it { is_expected.to allow_value("my/domain/com/my-app/1.0-SNAPSHOT").for(:path) } it { is_expected.to allow_value("my/domain/com/my-app/1.0-SNAPSHOT").for(:path) }
it { is_expected.to_not allow_value("my(domain)com.my-app").for(:path) } it { is_expected.not_to allow_value("my(domain)com.my-app").for(:path) }
end end
end end
end end
...@@ -13,7 +13,7 @@ RSpec.describe Packages::Package, type: :model do ...@@ -13,7 +13,7 @@ RSpec.describe Packages::Package, type: :model do
describe '#name' do describe '#name' do
it { is_expected.to allow_value("my/domain/com/my-app").for(:name) } it { is_expected.to allow_value("my/domain/com/my-app").for(:name) }
it { is_expected.to allow_value("my.app-11.07.2018").for(:name) } it { is_expected.to allow_value("my.app-11.07.2018").for(:name) }
it { is_expected.to_not allow_value("my(dom$$$ain)com.my-app").for(:name) } it { is_expected.not_to allow_value("my(dom$$$ain)com.my-app").for(:name) }
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment