|
62 | 62 | end |
63 | 63 |
|
64 | 64 | context 'when redirected message available' do |
65 | | - let(:message) do |
66 | | - <<~MSG |
67 | | - Project 'foo/bar' was moved to 'foo/baz'. |
68 | | -
|
69 | | - Please update your Git remote: |
70 | | -
|
71 | | - git remote set-url origin http://localhost:3000/foo/baz.git |
72 | | - MSG |
73 | | - end |
74 | | - |
| 65 | + let(:message) { "This is a redirected message" } |
75 | 66 | let(:response) do |
76 | 67 | { |
77 | 68 | 'reference_counter_decreased' => true, |
|
86 | 77 | end |
87 | 78 |
|
88 | 79 | context 'when project created message is available' do |
89 | | - let(:message) do |
90 | | - <<~MSG |
91 | | -
|
92 | | - The private project foo/bar was successfully created. |
93 | | -
|
94 | | - To configure the remote, run: |
95 | | - git remote add origin http://localhost:3000/foo/bar.git |
96 | | -
|
97 | | - To view the project, visit: |
98 | | - http://localhost:3000/foo/bar |
99 | | -
|
100 | | - MSG |
101 | | - end |
102 | | - |
| 80 | + let(:message) { "This is a created project message" } |
103 | 81 | let(:response) do |
104 | 82 | { |
105 | 83 | 'reference_counter_decreased' => true, |
@@ -163,29 +141,10 @@ def assert_broadcast_message_printed(gitlab_post_receive) |
163 | 141 | end |
164 | 142 |
|
165 | 143 | def assert_redirected_message_printed(gitlab_post_receive) |
166 | | - message = <<~MSG |
167 | | - Project 'foo/bar' was moved to 'foo/baz'. |
168 | | -
|
169 | | - Please update your Git remote: |
170 | | -
|
171 | | - git remote set-url origin http://localhost:3000/foo/baz.git |
172 | | - MSG |
173 | | - expect(gitlab_post_receive).to receive(:puts).with(message).ordered |
| 144 | + expect(gitlab_post_receive).to receive(:puts).with("This is a redirected message") |
174 | 145 | end |
175 | 146 |
|
176 | 147 | def assert_project_created_message_printed(gitlab_post_receive) |
177 | | - message = <<~MSG |
178 | | -
|
179 | | - The private project foo/bar was successfully created. |
180 | | -
|
181 | | - To configure the remote, run: |
182 | | - git remote add origin http://localhost:3000/foo/bar.git |
183 | | -
|
184 | | - To view the project, visit: |
185 | | - http://localhost:3000/foo/bar |
186 | | -
|
187 | | - MSG |
188 | | - |
189 | | - expect(gitlab_post_receive).to receive(:puts).with(message).ordered |
| 148 | + expect(gitlab_post_receive).to receive(:puts).with("This is a created project message") |
190 | 149 | end |
191 | 150 | end |
0 commit comments