Sha256: 7eef2ccc270f39cd2e8ff2656bcb6dc332342c630d2c06d2498240b741a09ae8
Contents?: true
Size: 1016 Bytes
Versions: 4
Compression:
Stored size: 1016 Bytes
Contents
require 'test_helper' class ActsAsZoneTest < ActiveSupport::TestCase def epom_field(field) Zone.epom_fields.key(field) end test 'fancy_method' do assert_raises NoMethodError do Zone.fancy_method end end test 'save an zone' do unless EpomRails.config.offline zone = zones(:one) assert zone.save assert_instance_of Fixnum, zone.send(epom_field('id')) # testing update_zone assert zone.update name: 'otro string' end end test 'delete an zone' do unless EpomRails.config.offline zone = zones(:one) assert zone.save assert_instance_of Fixnum, zone.send(epom_field('id')) epom_id = zone.send(epom_field('id')) assert zone.destroy end end test 'epom methods' do unless EpomRails.config.offline zone = zones(:one) assert zone.save assert_instance_of Fixnum, zone.send(epom_field('id')) response = Zone.get_zone_placements({:zoneId => zone.send(epom_field('id'))}, {}) assert_instance_of Array, response end end end
Version data entries
4 entries across 4 versions & 1 rubygems