Skip to content

Commit 958de54

Browse files
committed
Adapt specs according to new validation for attrib model
1 parent a4549c8 commit 958de54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/spec/controllers/webui/attribute_controller_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107

108108
context 'with editable values' do
109109
before do
110-
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type1.id } }
110+
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type1.id }, project_name: user.home_project.name }
111111
end
112112

113113
it { expect(response).to redirect_to(edit_attribs_path(project: user.home_project_name, package: '', attribute: attribute_type1_name)) }
@@ -116,7 +116,7 @@
116116

117117
context 'with non editable values' do
118118
before do
119-
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type0.id } }
119+
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type0.id }, project_name: user.home_project.name }
120120
end
121121

122122
it { expect(response).to redirect_to(index_attribs_path(project: user.home_project_name, package: '')) }
@@ -126,7 +126,7 @@
126126
context 'fails at save' do
127127
before do
128128
allow_any_instance_of(Attrib).to receive(:save).and_return(false)
129-
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type1.id } }
129+
post :create, params: { attrib: { project_id: user.home_project.id, attrib_type_id: attribute_type1.id }, project_name: user.home_project.name }
130130
end
131131

132132
it { expect(response).to redirect_to(root_path) }

0 commit comments

Comments
 (0)