debian-mirror-gitlab/spec/features/dashboard/group_spec.rb

23 lines
587 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
RSpec.describe 'Dashboard Group' do
2017-08-17 22:00:37 +05:30
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:user))
2017-08-17 22:00:37 +05:30
end
it 'creates new group', js: true do
visit dashboard_groups_path
2017-09-10 17:25:29 +05:30
find('.btn-new').trigger('click')
2017-08-17 22:00:37 +05:30
new_path = 'Samurai'
new_description = 'Tokugawa Shogunate'
fill_in 'group_path', with: new_path
fill_in 'group_description', with: new_description
click_button 'Create group'
expect(current_path).to eq group_path(Group.find_by(name: new_path))
expect(page).to have_content(new_path)
expect(page).to have_content(new_description)
end
end