diff options
Diffstat (limited to 'test/integration/community_messages_test.rb')
-rw-r--r-- | test/integration/community_messages_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/community_messages_test.rb b/test/integration/community_messages_test.rb index ec9a502..5c9b0da 100644 --- a/test/integration/community_messages_test.rb +++ b/test/integration/community_messages_test.rb @@ -38,7 +38,7 @@ class CommunityMessagesTest < ActionDispatch::IntegrationTest def test_new_jointable_entries sender_headers - post '/numlab/exercises', BODY_DATA, @headers + post '/numlab/exercises', params: { message: { body: BODY_DATA }}, headers: @headers assert_response 201 mid = URI.split(headers["Location"])[5].sub(/.*\/(.*)/, '\1') assert Message.find(mid).communities.map{|c| c.name}.include?(communities(:suv).name) @@ -50,12 +50,12 @@ class CommunityMessagesTest < ActionDispatch::IntegrationTest r=Ressource.find_by_namespace_and_ressource("numlab","exercises");r.events=false;r.save! cm_count = CommunityMessage.all.length sender_headers - post '/numlab/exercises', BODY_DATA, @headers + post '/numlab/exercises', params: { message: { body: BODY_DATA }}, headers: @headers assert_equal cm_count+2, CommunityMessage.all.length # addressed to two communities location = URI.split(headers["Location"])[5][1..-1].sub(/[^\/]*\/(.*)/, '\1') mid = URI.split(headers["Location"])[5].sub(/.*\/(.*)/, '\1') sender_headers - delete '/numlab/'+location, nil, @headers + delete '/numlab/'+location, params: nil, headers: @headers assert_response 200 assert_equal cm_count, CommunityMessage.all.length end |