Sha256: 1257328a5a8f8b8f49945dc6380f2d47d5a0d652b2b6a86242673ae8d4400449
Contents?: true
Size: 1.57 KB
Versions: 23
Compression:
Stored size: 1.57 KB
Contents
require 'spec_helper' module Naf describe ApplicationRunGroupRestriction do # Mass-assignment [:application_run_group_restriction_name].each do |a| it { should allow_mass_assignment_of(a) } end [:id, :created_at].each do |a| it { should_not allow_mass_assignment_of(a) } end #--------------------- # *** Associations *** #+++++++++++++++++++++ it { should have_many(:application_schedules) } it { should have_many(:historical_jobs) } #-------------------- # *** Validations *** #++++++++++++++++++++ it { should validate_presence_of(:application_run_group_restriction_name) } #---------------------- # *** Class Methods *** #++++++++++++++++++++++ describe "#no_limit" do let!(:no_limit) { FactoryGirl.create(:no_limit) } it "return the no limit group restriction" do ::Naf::ApplicationRunGroupRestriction.no_limit.should == no_limit end end describe "#limited_per_machine" do let!(:limited_per_machine) { FactoryGirl.create(:limited_per_machine) } it "return the limited per machine group restriction" do ::Naf::ApplicationRunGroupRestriction.limited_per_machine.should == limited_per_machine end end describe "#limited_per_all_machines" do let!(:limited_per_all_machines) { FactoryGirl.create(:limited_per_all_machines) } it "return the limited per all machines group restriction" do ::Naf::ApplicationRunGroupRestriction.limited_per_all_machines.should == limited_per_all_machines end end end end
Version data entries
23 entries across 23 versions & 1 rubygems