Skip to content

Commit

Permalink
Restore translation for single-use-link button
Browse files Browse the repository at this point in the history
  • Loading branch information
awead committed Aug 26, 2016
1 parent 3bd75e2 commit b2a771b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/locales/sufia.en.yml
Expand Up @@ -15,6 +15,7 @@ en:
view_profile: "View Profile"
edit_profile: "Edit Profile"
single_use_links:
button: "Single-Use Link to File"
expiration_message: "Link %{link} expires %{time}"
directory:
suffix: "@example.org"
Expand Down
Expand Up @@ -20,8 +20,8 @@
let(:presenter) do
Sufia::WorkShowPresenter.new(solr_document, ability)
end
let(:page) { Capybara::Node::Simple.new(rendered) }
describe 'citations' do
let(:page) { Capybara::Node::Simple.new(rendered) }
before do
Sufia.config.citations = citations
allow(controller).to receive(:can?).with(:edit, presenter).and_return(false)
Expand All @@ -46,4 +46,19 @@
end
end
end

describe 'editor' do
before do
allow(presenter).to receive(:editor?).and_return(true)
assign(:presenter, presenter)
view.lookup_context.view_paths.push 'app/views/curation_concerns/base'
render
end

it 'renders actions for the user' do
expect(page).to have_link("Edit This File")
expect(page).to have_link("Delete This File")
expect(page).to have_link("Single-Use Link to File")
end
end
end

0 comments on commit b2a771b

Please sign in to comment.