|
@@ -73,21 +73,13 @@ class Api::V1::MembershipsControllerTest < ActionDispatch::IntegrationTest
|
73
|
73
|
assert_response :forbidden
|
74
|
74
|
end
|
75
|
75
|
|
76
|
|
- # test "should forbid update read_only attributes - team_id" do
|
77
|
|
- # patch api_v1_membership_url(@membership),
|
78
|
|
- # headers: { Authorization: JsonWebToken.encode(user_id: @user.id) },
|
79
|
|
- # params: { membership: { team_id: @team2.id } },
|
80
|
|
- # as: :json
|
81
|
|
- # assert_response :unprocessable_entity
|
82
|
|
- # end
|
83
|
|
-
|
84
|
|
- # test "should forbid update read_only attributes - member_id" do
|
85
|
|
- # patch api_v1_membership_url(@membership),
|
86
|
|
- # headers: { Authorization: JsonWebToken.encode(user_id: @user.id) },
|
87
|
|
- # params: { membership: { member_id: @user2.id } },
|
88
|
|
- # as: :json
|
89
|
|
- # assert_response :unprocessable_entity
|
90
|
|
- # end
|
|
76
|
+ test "should forbid update read_only attributes - team_id" do
|
|
77
|
+ patch api_v1_membership_url(@membership),
|
|
78
|
+ headers: { Authorization: JsonWebToken.encode(user_id: @user.id) },
|
|
79
|
+ params: { membership: { team_id: @team2.id, member_id: @user2.id } },
|
|
80
|
+ as: :json
|
|
81
|
+ assert_response :unprocessable_entity
|
|
82
|
+ end
|
91
|
83
|
|
92
|
84
|
# DESTROY
|
93
|
85
|
test "should destroy membership" do
|