2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
describe 'Edit group label' do
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:label) { create(:group_label, group: group) }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
before do
|
2017-08-17 22:00:37 +05:30
|
|
|
group.add_owner(user)
|
2017-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
2017-08-17 22:00:37 +05:30
|
|
|
visit edit_group_label_path(group, label)
|
|
|
|
end
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
it 'update label with new title' do
|
2017-08-17 22:00:37 +05:30
|
|
|
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
|