fix mass-assignment error in user create API
This commit is contained in:
parent
770ec3359d
commit
c610206321
2 changed files with 6 additions and 6 deletions
|
@ -4,7 +4,7 @@ describe Gitlab::API do
|
|||
include ApiHelpers
|
||||
|
||||
let(:user) { Factory :user }
|
||||
let(:admin) {Factory :admin}
|
||||
let(:admin) { Factory :admin }
|
||||
let(:key) { Factory :key, user: user }
|
||||
|
||||
describe "GET /users" do
|
||||
|
@ -42,9 +42,9 @@ describe Gitlab::API do
|
|||
end
|
||||
|
||||
it "should create user" do
|
||||
expect{
|
||||
post api("/users", admin), Factory.attributes(:user)
|
||||
}.to change{User.count}.by(1)
|
||||
expect {
|
||||
post api("/users", admin), Factory.attributes(:user, projects_limit: 3)
|
||||
}.to change { User.count }.by(1)
|
||||
end
|
||||
|
||||
it "shouldn't available for non admin users" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue