Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E1642 Refactor review_response_map.rb #797

Merged
merged 29 commits into from Nov 16, 2016
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
75bf438
metareview_response_maps refactored
VivekBhat Oct 25, 2016
7a2e687
metareview_response_maps
VivekBhat Oct 25, 2016
9f848d5
metareview_response_maps refactored
VivekBhat Oct 25, 2016
a4124da
Used find_by instead of where.first
VivekBhat Oct 25, 2016
99d8e36
changes related to Assignment Branch Condition size for final_version…
abhinand-lingareddy Oct 26, 2016
4e270e0
changing access modifier of prepare_review_response and prepare_final…
abhinand-lingareddy Oct 26, 2016
4575151
metareview_response_map double iteration removed
VivekBhat Oct 26, 2016
1f43c5e
refactoring done
VivekBhat Oct 26, 2016
f94fa83
changes as part replacing for with each
abhinand-lingareddy Oct 27, 2016
eb88cc8
changes as part of adding rpsec test for reviewresponsemap
abhinand-lingareddy Oct 27, 2016
953fa19
Merge pull request #1 from VivekBhat/vbhat
SmokingSadhus Oct 27, 2016
420a640
Merge pull request #2 from SmokingSadhus/abhinand
SmokingSadhus Oct 27, 2016
43a765a
Refactoring Get_assessments_round_for and removal of import method
SmokingSadhus Oct 27, 2016
d7a4ea6
Merge branch 'master' of https://github.com/SmokingSadhus/expertiza
SmokingSadhus Oct 27, 2016
61456d4
issue fix on metareview method
SmokingSadhus Oct 27, 2016
07d97a2
changes as part of adding test for final_versions_from_reviewer
abhinand-lingareddy Oct 28, 2016
5db4672
added test should return the valid questionnaire
abhinand-lingareddy Oct 28, 2016
7fe6503
refactored title method name
abhinand-lingareddy Oct 28, 2016
78176bc
changes as part of adding test for export_fields
abhinand-lingareddy Oct 28, 2016
56db467
Merge pull request #3 from SmokingSadhus/abhinand
SmokingSadhus Oct 28, 2016
c4c2109
Create new factory for reponse and response_map
SmokingSadhus Oct 28, 2016
d65400b
Merge branch 'master' of https://github.com/SmokingSadhus/expertiza
SmokingSadhus Oct 28, 2016
b5f6fcc
Add new test cases for refactored method get_responses_for_team_round
SmokingSadhus Oct 28, 2016
dc0735b
Added unit tests for rereview_response_maps
SmokingSadhus Oct 28, 2016
cbb69eb
Revert and Codefix
SmokingSadhus Oct 28, 2016
aab2166
added few rspec tests for getfinalreviewresponse
abhinand-lingareddy Oct 29, 2016
e41b6a6
Fixing metareview_response refactor and get_title refactor
SmokingSadhus Oct 29, 2016
40a68bf
Merge branch 'master' of https://github.com/SmokingSadhus/expertiza
SmokingSadhus Oct 29, 2016
f1be3e0
remove unnecessary variables
SmokingSadhus Oct 29, 2016
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+27 −3
Diff settings

Always

Just for now

Add new test cases for refactored method get_responses_for_team_round

  • Loading branch information...
SmokingSadhus committed Oct 28, 2016
commit b5f6fcc7913a9f2e8946da7638b947de732298d9
@@ -6,10 +6,7 @@
@participant=create(:participant)
@assignment_questionnaire= create(:assignment_questionnaire)
@review_response=create(:review_response_map)


end

describe "#validity" do
it "should have a valid reviewee_id" do
expect(@review_response.reviewee_id).to be_instance_of(Fixnum)
@@ -32,4 +29,31 @@
expect(export_fields.length).to be(2)
end
end

describe "#Test for the get_responses_for_team_round method" do

it "should return correct number of reponses per round for a team" do

@review1 = create(:response_1)
@review2 = create(:response_1)
@responsemap2= create(:response_map)
@review2.update(response_map: @responsemap2 )
@team = build(:assignment_team)
@team.id=1
expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)
end

it "should return only those reponses which are related to a particular round" do

@review1 = create(:response_1)
@review2 = create(:response_1)
@responsemap2= create(:response_map)
@review2.update(response_map: @responsemap2 )
@review2.update(round: 2)
@team = build(:assignment_team)
@team.id=1
expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)
end
end

end
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.