aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuc Donnet2017-09-04 15:29:42 +0200
committerLuc Donnet2017-09-04 15:29:42 +0200
commitcbbecf7c40e8102a2b0c24aabb3aabf7e89391cf (patch)
tree05c19b5f40c6a29edcc55dbc94b0ba2f37a6f466 /spec
parentcb9d3c4cfa0128499c8ed2e6ee8ff8e254d4f841 (diff)
downloadchouette-core-cbbecf7c40e8102a2b0c24aabb3aabf7e89391cf.tar.bz2
Delete AAM in import_resource model Refs #4527
Diffstat (limited to 'spec')
-rw-r--r--spec/factories/import_resources.rb2
-rw-r--r--spec/models/import_resource_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/factories/import_resources.rb b/spec/factories/import_resources.rb
index 125f549b8..76afcc486 100644
--- a/spec/factories/import_resources.rb
+++ b/spec/factories/import_resources.rb
@@ -1,7 +1,7 @@
FactoryGirl.define do
factory :import_resource do
association :import
- status :new
+ status :WARNING
sequence(:name) { |n| "Import resource #{n}" }
resource_type 'type'
reference 'reference'
diff --git a/spec/models/import_resource_spec.rb b/spec/models/import_resource_spec.rb
index 6416babdc..c88bb5dd2 100644
--- a/spec/models/import_resource_spec.rb
+++ b/spec/models/import_resource_spec.rb
@@ -3,7 +3,7 @@ require 'rails_helper'
RSpec.describe ImportResource, :type => :model do
it { should belong_to(:import) }
- it { should enumerize(:status).in(:OK, :ERROR, :WARNING, :IGNORED) }
+ it { should enumerize(:status).in("OK", "ERROR", "WARNING", "IGNORED") }
it { should validate_presence_of(:name) }
it { should validate_presence_of(:resource_type) }
@@ -13,7 +13,7 @@ RSpec.describe ImportResource, :type => :model do
let(:import_resource) { create(:import_resource) }
it 'should initialize with new state' do
- expect(import_resource.new?).to be_truthy
+ expect(import_resource.status).to eq("WARNING")
end
end
end