Skip to content

Commit

Permalink
fixed tests. #284
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 1, 2019
1 parent 4e0af35 commit 267f005
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/concerns/indexable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 3 additions & 8 deletions spec/models/doi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 267f005

Please sign in to comment.