diff options
Diffstat (limited to 'spec/features/groups/labels/create_spec.rb')
-rw-r--r-- | spec/features/groups/labels/create_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/groups/labels/create_spec.rb b/spec/features/groups/labels/create_spec.rb new file mode 100644 index 00000000000..f5062a65321 --- /dev/null +++ b/spec/features/groups/labels/create_spec.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'Create a group label' do + let(:user) { create(:user) } + let(:group) { create(:group) } + + before do + group.add_owner(user) + sign_in(user) + visit group_labels_path(group) + end + + it 'creates a new label' do + click_link 'New label' + fill_in 'Title', with: 'test-label' + click_button 'Create label' + + expect(page).to have_content 'test-label' + expect(current_path).to eq(group_labels_path(group)) + end +end |