Add Rspec test for "i" shortcut

This commit is contained in:
Alfredo Sumaran 2016-04-21 14:24:36 -05:00
parent f5a6ff1548
commit 6e9ce9a6cd

View file

@ -0,0 +1,21 @@
require 'spec_helper'
feature 'Project shortcuts', feature: true do
let(:project) { create(:project) }
let(:user) { create(:user) }
describe 'On a project', js: true do
before do
project.team << [user, :master]
login_as user
visit namespace_project_path(project.namespace, project)
end
describe 'pressing "i"' do
it 'redirects to new issue page' do
find('body').native.send_key('i')
expect(page).to have_content('New Issue')
end
end
end
end