Skip to content

Commit

Permalink
[wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Nov 3, 2022
1 parent 8f188e7 commit f0f940a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/system/work_edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,23 @@
expect(page.find("#contributor_family_name_1").value).to eq "Loya"
end
end

context "as a user without curator privileges" do
let(:work) { FactoryBot.create(:distinct_cytoskeletal_proteins_work) }
let(:user) { work.created_by_user }

it "renders the publisher and publication year form fields as read-only" do
sign_in user
visit edit_work_path(work)
click_on "Curator Controlled"

publisher_element = page.find("#publisher")
expect(publisher_element.tag_name).to eq("input")
expect(publisher_element["readonly"]).to eq("true")

publication_year_element = page.find("#publication_year")
expect(publication_year_element.tag_name).to eq("input")
expect(publication_year_element["readonly"]).to eq("true")
end
end
end

0 comments on commit f0f940a

Please sign in to comment.