From b65e4fdf50ce8e618b0f76763a24422054d384b0 Mon Sep 17 00:00:00 2001 From: Oliver Denman Date: Thu, 11 May 2017 11:23:17 +0100 Subject: [PATCH] Test member data with non-party group --- test/cassettes/lkh_htm.yml | 122 +++++++++++++++++++++++++++++++++++++ test/data/kwok-hung.yml | 20 ++++++ 2 files changed, 142 insertions(+) create mode 100644 test/cassettes/lkh_htm.yml create mode 100644 test/data/kwok-hung.yml diff --git a/test/cassettes/lkh_htm.yml b/test/cassettes/lkh_htm.yml new file mode 100644 index 000000000..f6ec7087c --- /dev/null +++ b/test/cassettes/lkh_htm.yml @@ -0,0 +1,122 @@ +--- +http_interactions: +- request: + method: get + uri: http://www.legco.gov.hk/general/english/members/yr16-20/lkh.htm + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 11 May 2017 10:09:24 GMT + Server: + - Apache/2.2.3 (Red Hat) + Last-Modified: + - Thu, 22 Dec 2016 09:17:57 GMT + Etag: + - '"2a600a9-173d-5443bbeb75b40"' + Accept-Ranges: + - bytes + Content-Length: + - '5949' + X-Ua-Compatible: + - IE=edge + Cache-Control: + - max-age=0, private, no-store, no-cache, must-revalidate + Connection: + - close + Content-Type: + - text/html + Set-Cookie: + - BIGipServerWeb_80_pool=352400138.20480.0000; path=/ + body: + encoding: UTF-8 + string: " + \r\n\r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n Legislative Council of + the Hong Kong Special Administrative Region - Members' Biographies ::Hon LEUNG + Kwok-hung\r\n\t\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \t\r\n \r\n \r\n + \ \r\n + \ \r\n + \ \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n
\r\n \r\n + \
\r\n
\r\n + \
\r\n + \
\r\n
\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\t
\t\t\r\n\t\t\t\t\t
\t\t\t\r\n\t\t\t\t
\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
\"\"
\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\t\t\t\t\t\t\r\n\t\r\n
\r\n
\r\n\r\n\r\n\"Hon\r\n\r\n\r\n

Hon LEUNG Kwok-hung\r\n

\r\n\r\n\r\n

Constituency :

\r\n
  • Geographical Constituency + - New Territories East\r\n
\r\n\r\n\r\n

Education and professional qualifications + :

\r\n
    \r\n
  • Form Six\r\n
\r\n\r\n\r\n

Occupation :

\r\n
    \r\n
  • Legislative Council + Member\r\n
\r\n\r\n\r\n

Political + affiliation :

\r\n
    \r\n
  • April Fifth Action\r\n
  • League + of Social Democrats\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
Office address:\r\nRoom + 1019, Legislative Council Complex,
\r\n1 Legislative Council Road, Central, + Hong Kong\r\n
Office + telephone:2537 0229
Office fax:2537 0119\r\n
E-mail:longhairlongmarch@yahoo.com.hk\r\n
Homepage or Résumé:-\r\n
\r\n

(Information + as provided by Member)

\r\n
\r\n
\r\n\t\t\t\t\t\r\n\t\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t + \
\r\n\t \r\n
\r\n\t\t
\r\n + \ \r\n \r\n + \ \r\n + \ \r\n + \
\t \r\n\t
\r\n \r\n" + http_version: + recorded_at: Thu, 11 May 2017 10:09:25 GMT +recorded_with: VCR 3.0.3 diff --git a/test/data/kwok-hung.yml b/test/data/kwok-hung.yml new file mode 100644 index 000000000..d982ddbf2 --- /dev/null +++ b/test/data/kwok-hung.yml @@ -0,0 +1,20 @@ +:url: http://www.legco.gov.hk/general/english/members/yr16-20/lkh.htm +:class: MemberPage +:to_h: + :id: yr16-20/lkh + :term: yr16-20 + :name: LEUNG Kwok-hung + :honorific_prefix: Hon + :honorific_suffix: '' + :gender: + # The member's page lists an affiliation with a non party group + # This test ensures that :faction does not contain the non part group + :faction: League of Social Democrats + :email: longhairlongmarch@yahoo.com.hk + :website: '' + :phone: 2537 0229 + :fax: 2537 0119 + :img: http://www.legco.gov.hk/images/mem_1620/lkh.jpg + :area: New Territories East + :area_type: geographical + :source: http://www.legco.gov.hk/general/english/members/yr16-20/lkh.htm