end
end
- context 'domain with dash' do
+ context 'when domain has dash' do
let(:params) do
{
server: 'p-gp.m-it.edu',
end
end
- context 'url' do
+ context 'with url' do
let :params do
{
server: 'hkp://pgp.mit.edu',
server: 'hkp://pgp.mit.edu')
end
end
- context 'url with port number' do
+ context 'with url and port number' do
let :params do
{
server: 'hkp://pgp.mit.edu:80',
end
describe 'validation' do
- context 'domain begin with dash' do
+ context 'when domain begins with a dash' do
let(:params) do
{
server: '-pgp.mit.edu',
end
end
- context 'domain begin with dot' do
+ context 'when domain begins with dot' do
let(:params) do
{
server: '.pgp.mit.edu',
end
end
- context 'domain end with dot' do
+ context 'when domain ends with dot' do
let(:params) do
{
server: 'pgp.mit.edu.',
is_expected .to raise_error(%r{expects a match})
end
end
- context 'exceed character url' do
+ context 'when url character limit is exceeded' do
let :params do
{
server: 'hkp://pgpiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii.mit.edu',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'incorrect port number url' do
+ context 'with incorrect port number url' do
let :params do
{
server: 'hkp://pgp.mit.edu:8008080',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'incorrect protocol for url' do
+ context 'with incorrect protocol for url' do
let :params do
{
server: 'abc://pgp.mit.edu:80',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'missing port number url' do
+ context 'with missing port number url' do
let :params do
{
server: 'hkp://pgp.mit.edu:',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'url ending with a dot' do
+ context 'with url ending with a dot' do
let :params do
{
server: 'hkp://pgp.mit.edu.',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'url begin with a dash' do
+ context 'with url begin with a dash' do
let(:params) do
{
server: 'hkp://-pgp.mit.edu',
is_expected.to raise_error(%r{expects a match})
end
end
- context 'invalid key' do
+ context 'with invalid key' do
let :title do
'Out of rum. Why? Why are we out of rum?'
end
end
end
- context 'invalid source' do
+ context 'with invalid source' do
let :params do
{
source: 'afp://puppetlabs.com/key.gpg',
end
end
- context 'invalid content' do
+ context 'with invalid content' do
let :params do
{
content: [],
end
end
- context 'invalid server' do
+ context 'with invalid server' do
let :params do
{
server: 'two bottles of rum',
end
end
- context 'invalid keyserver_options' do
+ context 'with invalid keyserver_options' do
let :params do
{
options: {},
end
end
- context 'invalid ensure' do
+ context 'with invalid ensure' do
let :params do
{
ensure: 'foo',