mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
parent
71e62a5f86
commit
eb2796483d
2 changed files with 4 additions and 4 deletions
|
@ -17,20 +17,20 @@ RSpec.describe 'admin zone create', settings: false do
|
|||
|
||||
text_attributes.each do |attr_name|
|
||||
it "saves #{attr_name}" do
|
||||
post admin_zones_path, { zone: attributes_for(:zone, attr_name => 'test') }
|
||||
post admin_zones_path, zone: attributes_for(:zone, attr_name => 'test')
|
||||
expect(zone.send(attr_name)).to eq('test')
|
||||
end
|
||||
end
|
||||
|
||||
integer_attributes.each do |attr_name|
|
||||
it "saves #{attr_name}" do
|
||||
post admin_zones_path, { zone: attributes_for(:zone, attr_name => '1') }
|
||||
post admin_zones_path, zone: attributes_for(:zone, attr_name => '1')
|
||||
expect(zone.send(attr_name)).to eq(1)
|
||||
end
|
||||
end
|
||||
|
||||
it 'redirects to :index' do
|
||||
post admin_zones_path, { zone: attributes_for(:zone) }
|
||||
post admin_zones_path, zone: attributes_for(:zone)
|
||||
expect(response).to redirect_to admin_zones_url
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,7 +33,7 @@ RSpec.describe 'admin zone update', settings: false do
|
|||
it 'redirects to :index' do
|
||||
zone = create(:zone)
|
||||
|
||||
patch admin_zone_path(zone), { zone: attributes_for(:zone) }
|
||||
patch admin_zone_path(zone), zone: attributes_for(:zone)
|
||||
|
||||
expect(response).to redirect_to admin_zones_url
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue