diff --git a/spec/concerns/indexable_spec.rb b/spec/concerns/indexable_spec.rb index 654090ec7..c2055951a 100644 --- a/spec/concerns/indexable_spec.rb +++ b/spec/concerns/indexable_spec.rb @@ -69,7 +69,7 @@ end context "doi" do - let!(:doi) { create(:doi, titles: { title: "Soil investigations" }, publisher: "Pangaea", descriptions: { description: "this is a description" }) } + let!(:doi) { create(:doi, titles: { title: "Soil investigations" }, publisher: "Pangaea", descriptions: { description: "this is a description" }, aasm_state: "findable") } before do Doi.import diff --git a/spec/models/doi_spec.rb b/spec/models/doi_spec.rb index fe7d98bf4..6cb255a3b 100644 --- a/spec/models/doi_spec.rb +++ b/spec/models/doi_spec.rb @@ -434,7 +434,7 @@ let(:provider) { create(:provider) } let(:client) { create(:client, provider: provider) } let(:target) { create(:client, provider: provider, symbol: provider.symbol + ".TARGET", name: "Target Client") } - let!(:dois) { create_list(:doi, 3, client: client, creators: nil) } + let!(:dois) { create_list(:doi, 3, client: client, aasm_state: "findable") } let(:doi) { dois.first } before do @@ -461,18 +461,13 @@ response = Doi.import_by_day(from_date: Date.today.strftime("%F")) expect(response).to eq(3) end - - it "import by day missing" do - response = Doi.import_by_day_missing(from_date: Date.today.strftime("%F")) - expect(response).to eq(3) - end end describe "index", elasticsearch: true do let(:provider) { create(:provider) } let(:client) { create(:client, provider: provider) } let(:target) { create(:client, provider: provider, symbol: provider.symbol + ".TARGET", name: "Target Client") } - let!(:dois) { create_list(:doi, 3, client: client, creators: nil) } + let!(:dois) { create_list(:doi, 3, client: client, aasm_state: "findable") } let(:doi) { dois.first } before do @@ -505,7 +500,7 @@ let(:provider) { create(:provider) } let(:client) { create(:client, provider: provider) } let(:target) { create(:client, provider: provider, symbol: provider.symbol + ".TARGET", name: "Target Client") } - let!(:dois) { create_list(:doi, 5, client: client) } + let!(:dois) { create_list(:doi, 5, client: client, aasm_state: "findable") } before do Doi.import