gitlab-org--gitlab-foss/spec/features/groups/labels/edit_spec.rb
Dmitriy Zaporozhets 7e42c22991
Fix 404 error when visit group label edit page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-06 18:50:48 +02:00

21 lines
541 B
Ruby

require 'spec_helper'
feature 'Edit group label', feature: true do
given(:user) { create(:user) }
given(:group) { create(:group) }
given(:label) { create(:group_label, group: group) }
background do
group.add_owner(user)
login_as(user)
visit edit_group_label_path(group, label)
end
scenario 'update label with new title' do
fill_in 'label_title', with: 'new label name'
click_button 'Save changes'
expect(current_path).to eq(root_path)
expect(label.reload.title).to eq('new label name')
end
end