Increase test coverage#186
Conversation
|
Hey looks good! You are on a roll man! For most of the specs I don't get why there has to be a mac user agent background though - I mean for the dl I get it but for the rest... ? |
|
Hi, in our StaticController we had the following code: after refactoring we got the following: So we had to define User-Agent for our test cases, but you are right, the way I solved this problem is not optimal. I'll commit improved version soon. |
|
@PragTob done :) |
|
Hey there, thanks! I believe that we do not need that user agent modification for all the specs/features. Although you are right that technically it would be the better refactoring/keeping the old behavior. I believe it's only needed for checking that the right download is there so we could implement it as a background there so it is only set for that feature scenario and not for all of them :) If I get to it before you I'll do it (should be ina couple of hours or tomorrow/this weekend) - thanks! Tobi |
|
You're right and I understand your point. Unfortunately, we cannot ignore this user-agent problem for other scenarios, because then we will get: Because in case, when we do not define user-agent we get the following error (every time when we visit root page): So there are two ways to solve the problem: 1st, define user-agent for cucumber 2nd, handle nil user-agent in StaticController P.S If I'm wrong, please, explain why :) |
|
You are totally right! My bad! Needed that explanation, sorry :) Just seems odd. I think a better solution would be to adjust the line of code. I think the 2nd solution sounds more robust, we don't want to fail if for some reason the UA is missing :) |
|
Ah you already did that, awesome I like it! Btw. great fast feedback loop on this PR :) |
|
Yeah, seems that the time zones difference is not a problem for us :) |
More tests! More!