Skip to content

Commit f7a9935

Browse files
committed
Fix spec
1 parent 2673831 commit f7a9935

File tree

7 files changed

+52
-52
lines changed

7 files changed

+52
-52
lines changed

spec/v3/services/installation/find_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
"allowance" => {
6060
"@representation" => "minimal",
6161
"@type" => "allowance",
62-
"id" => 1,
6362
"concurrency_limit" => 1,
6463
"private_repos" => false,
6564
"public_repos" => true,
6665
"subscription_type" => 1,
67-
"user_usage" => true,
68-
"pending_user_licenses" => false
66+
"user_usage" => false,
67+
"pending_user_licenses" => false,
68+
"id" => 1
6969
},
7070
"allow_migration" => false,
7171
"recently_signed_up" => false,

spec/v3/services/organization/find_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
"allowance" => {
2727
"@type" => "allowance",
2828
"@representation" => "minimal",
29-
"id" => org.id,
3029
"subscription_type" => 1,
3130
"public_repos" => true,
3231
"private_repos" => false,
3332
"concurrency_limit" => 1,
34-
"user_usage" => true,
35-
"pending_user_licenses" => false
33+
"user_usage" => false,
34+
"pending_user_licenses" => false,
35+
"id" => org.id
3636
}
3737
}}
3838
end
@@ -66,13 +66,13 @@
6666
"allowance" => {
6767
"@type" => "allowance",
6868
"@representation" => "minimal",
69-
"id" => org.id,
7069
"subscription_type" => 1,
7170
"public_repos" => true,
7271
"private_repos" => false,
7372
"concurrency_limit" => 1,
74-
"user_usage" => true,
75-
"pending_user_licenses" => false
73+
"user_usage" => false,
74+
"pending_user_licenses" => false,
75+
"id" => org.id
7676
}
7777
}}
7878
end

spec/v3/services/organizations/for_current_user_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
"allowance" => {
6363
"@type" => "allowance",
6464
"@representation" => "minimal",
65-
"id" => org.id,
6665
"subscription_type" => 1,
6766
"public_repos" => true,
6867
"private_repos" => false,
6968
"concurrency_limit" => 1,
70-
"user_usage" => true,
71-
"pending_user_licenses" => false
69+
"user_usage" => false,
70+
"pending_user_licenses" => false,
71+
"id" => org.id
7272
}
7373
}]
7474
}}

spec/v3/services/owner/find_spec.rb

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
"allowance" => {
2727
"@type" => "allowance",
2828
"@representation" => "minimal",
29-
"id" => org.id,
3029
"subscription_type" => 1,
3130
"public_repos" => true,
3231
"private_repos" => false,
3332
"concurrency_limit" => 1,
34-
"user_usage" => true,
35-
"pending_user_licenses" => false
33+
"user_usage" => false,
34+
"pending_user_licenses" => false,
35+
"id" => org.id
3636
}
3737
}}
3838
end
@@ -57,13 +57,13 @@
5757
"allowance" => {
5858
"@type" => "allowance",
5959
"@representation" => "minimal",
60-
"id" => org.id,
6160
"subscription_type" => 1,
6261
"public_repos" => true,
6362
"private_repos" => false,
6463
"concurrency_limit" => 1,
65-
"user_usage" => true,
66-
"pending_user_licenses" => false
64+
"user_usage" => false,
65+
"pending_user_licenses" => false,
66+
"id" => org.id
6767
}
6868
}}
6969
end
@@ -93,13 +93,13 @@
9393
"allowance" => {
9494
"@type" => "allowance",
9595
"@representation" => "minimal",
96-
"id" => org.id,
9796
"subscription_type" => 1,
9897
"public_repos" => true,
9998
"private_repos" => false,
10099
"concurrency_limit" => 1,
101-
"user_usage" => true,
102-
"pending_user_licenses" => false
100+
"user_usage" => false,
101+
"pending_user_licenses" => false,
102+
"id" => org.id
103103
},
104104
"repositories" => [{
105105
"@type" => "repository",
@@ -173,13 +173,13 @@
173173
"allowance" => {
174174
"@type" => "allowance",
175175
"@representation" => "minimal",
176-
"id" => org.id,
177176
"subscription_type" => 1,
178177
"public_repos" => true,
179178
"private_repos" => false,
180179
"concurrency_limit" => 1,
181-
"user_usage" => true,
182-
"pending_user_licenses" => false
180+
"user_usage" => false,
181+
"pending_user_licenses" => false,
182+
"id" => org.id
183183
},
184184
"repositories" => [{
185185
"@type" => "repository",
@@ -248,13 +248,13 @@
248248
"allowance" => {
249249
"@type" => "allowance",
250250
"@representation" => "minimal",
251-
"id" => org.id,
252251
"subscription_type" => 1,
253252
"public_repos" => true,
254253
"private_repos" => false,
255254
"concurrency_limit" => 1,
256-
"user_usage" => true,
257-
"pending_user_licenses" => false
255+
"user_usage" => false,
256+
"pending_user_licenses" => false,
257+
"id" => org.id
258258
}
259259
}}
260260
end
@@ -283,13 +283,13 @@
283283
"allowance" => {
284284
"@type" => "allowance",
285285
"@representation" => "minimal",
286-
"id" => org.id,
287286
"subscription_type" => 1,
288287
"public_repos" => true,
289288
"private_repos" => false,
290289
"concurrency_limit" => 1,
291-
"user_usage" => true,
292-
"pending_user_licenses" => false
290+
"user_usage" => false,
291+
"pending_user_licenses" => false,
292+
"id" => org.id
293293
},
294294
"@warnings" => [{
295295
"@type" => "warning",
@@ -328,13 +328,13 @@
328328
"allowance" => {
329329
"@type" => "allowance",
330330
"@representation" => "minimal",
331-
"id" => user.id,
332331
"subscription_type" => 1,
333332
"public_repos" => true,
334333
"private_repos" => false,
335334
"concurrency_limit" => 1,
336-
"user_usage" => true,
337-
"pending_user_licenses" => false
335+
"user_usage" => false,
336+
"pending_user_licenses" => false,
337+
"id" => user.id
338338
},
339339
"recently_signed_up"=>false,
340340
"secure_user_hash" => nil,
@@ -364,13 +364,13 @@
364364
"allowance" => {
365365
"@type" => "allowance",
366366
"@representation" => "minimal",
367-
"id" => user.id,
368367
"subscription_type" => 1,
369368
"public_repos" => true,
370369
"private_repos" => false,
371370
"concurrency_limit" => 1,
372-
"user_usage" => true,
373-
"pending_user_licenses" => false
371+
"user_usage" => false,
372+
"pending_user_licenses" => false,
373+
"id" => user.id
374374
},
375375
"recently_signed_up"=>false,
376376
"secure_user_hash" => nil,
@@ -400,13 +400,13 @@
400400
"allowance" => {
401401
"@type" => "allowance",
402402
"@representation" => "minimal",
403-
"id" => user.id,
404403
"subscription_type" => 1,
405404
"public_repos" => true,
406405
"private_repos" => false,
407406
"concurrency_limit" => 1,
408-
"user_usage" => true,
409-
"pending_user_licenses" => false
407+
"user_usage" => false,
408+
"pending_user_licenses" => false,
409+
"id" => user.id
410410
},
411411
"recently_signed_up"=>false,
412412
"secure_user_hash" => nil,
@@ -440,13 +440,13 @@
440440
"allowance" => {
441441
"@type" => "allowance",
442442
"@representation" => "minimal",
443-
"id" => user.id,
444443
"subscription_type" => 1,
445444
"public_repos" => true,
446445
"private_repos" => false,
447446
"concurrency_limit" => 1,
448-
"user_usage" => true,
449-
"pending_user_licenses" => false
447+
"user_usage" => false,
448+
"pending_user_licenses" => false,
449+
"id" => user.id
450450
},
451451
"recently_signed_up"=>false,
452452
"secure_user_hash" => nil,

spec/v3/services/repositories/for_owner_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,12 @@
560560
"@representation" => "standard",
561561
"@type" => "allowance",
562562
"concurrency_limit" => 1,
563-
"id" => 0,
564563
"private_repos" => false,
565564
"public_repos" => true,
566565
"subscription_type" => 1,
567566
"user_usage" => false,
568-
"pending_user_licenses" => false
567+
"pending_user_licenses" => false,
568+
"id" => 0
569569
}}
570570
end
571571

@@ -575,20 +575,20 @@
575575
Travis.config.billing.url = billing_url
576576
Travis.config.billing.auth_key = billing_auth_key
577577
stub_billing_request(:get, "/usage/users/1/allowance", auth_key: billing_auth_key, user_id: 1)
578-
.to_return(body: JSON.dump({ 'public_repos': true, 'private_repos': true, 'user_uage': true, 'pending_user_licenses': false, 'concurrency_limit': 666 }))
578+
.to_return(body: JSON.dump({ 'public_repos': true, 'private_repos': true, 'user_usage': true, 'pending_user_licenses': false, 'concurrency_limit': 666 }))
579579
get("/v3/owner/svenfuchs/allowance", {}, headers)
580580
end
581581
example { expect(last_response).to be_ok }
582582
example { expect(JSON.load(body)).to be == {
583583
"@representation" => "standard",
584584
"@type" => "allowance",
585585
"concurrency_limit" => 666,
586-
"id" => 1,
587586
"private_repos" => true,
588587
"public_repos" => true,
589588
"subscription_type" => 2,
590589
"user_usage" => true,
591-
"pending_user_licenses" => false
590+
"pending_user_licenses" => false,
591+
"id" => 1
592592
}}
593593
end
594594

spec/v3/services/user/current_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"allowance" => {
2828
"@type" => "allowance",
2929
"@representation" => "minimal",
30-
"id" => user.id,
3130
"subscription_type" => 1,
3231
"public_repos" => true,
3332
"private_repos" => false,
3433
"concurrency_limit" => 1,
3534
"user_usage" => false,
36-
"pending_user_licenses" => false
35+
"pending_user_licenses" => false,
36+
"id" => user.id
3737
},
3838
"recently_signed_up"=>false,
3939
"secure_user_hash" => nil

spec/v3/services/user/find_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Travis.config.billing.url = billing_url
1515
Travis.config.billing.auth_key = billing_auth_key
1616
stub_billing_request(:get, "/usage/users/#{user.id}/allowance", auth_key: billing_auth_key, user_id: user.id)
17-
.to_return(body: JSON.dump({ 'public_repos': true, 'private_repos': true, 'concurrency_limit': 666 }))
17+
.to_return(body: JSON.dump({ 'public_repos': true, 'private_repos': true, 'user_usage': true, 'pending_user_licenses': false, 'concurrency_limit': 666 }))
1818
end
1919

2020
describe "authenticated as user with access" do
@@ -40,13 +40,13 @@
4040
"allowance" => {
4141
"@type" => "allowance",
4242
"@representation" => "minimal",
43-
"id" => user.id,
4443
"subscription_type" => 2,
4544
"public_repos" => true,
4645
"private_repos" => true,
4746
"concurrency_limit" => 666,
4847
"user_usage" => true,
49-
"pending_user_licenses" => false
48+
"pending_user_licenses" => false,
49+
"id" => user.id
5050
},
5151
"recently_signed_up"=>false,
5252
"secure_user_hash" => nil,

0 commit comments

Comments
 (0)