Advertisement
nick_ponorets

create_app_spec.rb

Jan 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe 'create app check' do
  4.  
  5. url = Airborne.configuration.prod_url
  6. email = Airborne.configuration.auth_email
  7. password = Airborne.configuration.auth_password
  8.  
  9. title = 'test'
  10. package = 'ru.test.tapcore.api'
  11.  
  12. context 'CHECK_CREATE_APPLICATION' do
  13. before(:all) do
  14. @tap = Airborne::TapcoreApi.new(url)
  15. @tap.auth(url, email, password)
  16. token = json_body[:token]
  17. @tap.create_app(url, token, title, package)
  18. puts body
  19. end
  20.  
  21. context 'response' do
  22. it 'should be set' do
  23. expect(response).to_not be(nil)
  24. end
  25. end
  26.  
  27. context 'headers' do
  28. it 'should be set' do
  29. expect(headers).to_not be(nil)
  30. end
  31.  
  32. it 'correct content-type' do
  33. expect_header('content-type', 'application/json; charset=utf-8')
  34. end
  35. end
  36.  
  37. context 'body' do
  38. it 'should be set' do
  39. expect(body).to_not be(nil)
  40. end
  41. end
  42.  
  43. context 'status' do
  44. it 'should be set' do
  45. expect(status).to_not be(nil)
  46. end
  47.  
  48. it 'correct status' do
  49. expect_status 201
  50. end
  51. end
  52.  
  53. context 'json' do
  54. it 'should be set' do
  55. expect(json_body).to_not be(nil)
  56. end
  57. end
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement