Skip to content

Commit

Permalink
Don't assign editor on meta review create
Browse files Browse the repository at this point in the history
  • Loading branch information
arfon committed Aug 20, 2018
1 parent 6b4eab3 commit de16cae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions app/models/paper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def create_meta_review_issue(editor_handle)
end

return false if meta_review_issue_id
return false unless editor = Editor.find_by_login(striped_handle)

issue = GITHUB.create_issue(Rails.application.settings["reviews"],
"[PRE REVIEW]: #{self.title}",
Expand All @@ -215,7 +214,6 @@ def create_meta_review_issue(editor_handle)
:labels => "pre-review" })

set_meta_review_issue(issue.number)
set_editor(editor)
end

# Update the Paper meta_review_issue_id field
Expand Down
16 changes: 0 additions & 16 deletions spec/controllers/papers_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,6 @@
expect(response).to be_redirect
end

it "LOGGED IN and with correct params BUT with invalid editor handle" do
user = create(:admin_user)
allow(controller).to receive_message_chain(:current_user).and_return(user)

author = create(:user)
paper = create(:paper, :user_id => author.id)

fake_issue = Object.new
allow(fake_issue).to receive(:number).and_return(1)
allow(GITHUB).to receive(:create_issue).and_return(fake_issue)

expect {
post :start_meta_review, params: {:id => paper.sha, :editor => "joss"}
}.to raise_error(AASM::InvalidTransition)
end

it "LOGGED IN and with correct params" do
user = create(:admin_user)
editor = create(:editor, :login => "josseditor")
Expand Down

0 comments on commit de16cae

Please sign in to comment.