everypolitician / commons-builder

Build scripts for Democratic Commons repositories
MIT License
1 stars 0 forks source link

Deduplicate person links if multiple result rows #94

Closed alexdutton closed 6 years ago

alexdutton commented 6 years ago

Previously, if a membership row was duplicated, we'd end up with a link item in the person for every row, even if the link was the same. This calls .uniq! on the links to ensure there are no duplicates.

This is tested by adding a duplicate row to the fixtures and checking that it still produces the expected output data.

codecov[bot] commented 6 years ago

Codecov Report

Merging #94 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #94      +/-   ##
=========================================
+ Coverage   94.59%   94.6%   +<.01%     
=========================================
  Files          35      35              
  Lines         833     834       +1     
=========================================
+ Hits          788     789       +1     
  Misses         45      45
Impacted Files Coverage Δ
lib/commons/builder/membership_data.rb 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3ebd095...86f0438. Read the comment docs.

alexdutton commented 6 years ago

:pray: