OSDN Git Service

proper Grape params hash simulation
authormiks <miks@cubesystems.lv>
Thu, 6 Sep 2012 07:20:59 +0000 (10:20 +0300)
committermiks <miks@cubesystems.lv>
Thu, 6 Sep 2012 07:20:59 +0000 (10:20 +0300)
spec/requests/api/projects_spec.rb

index b1b5966..125101c 100644 (file)
@@ -68,7 +68,7 @@ describe Gitlab::API do
     it "should add users to existing project" do
       expect {
         put api("/projects/#{project.code}/add_users", user),
-          user_ids: [user2.id, user3.id], project_access: UsersProject::DEVELOPER
+          user_ids: {"0" => user2.id, "1" => user3.id}, project_access: UsersProject::DEVELOPER
       }.to change {Project.last.users_projects.where(:project_access => UsersProject::DEVELOPER).count}.by(2)
     end
   end