forked from External/greenlight
GRN2-217: Fixes issues with recording rows and localization (fixed #703-#705) (#707)
* Fixes issues with recording rows * Fixed small typo related to logs
This commit is contained in:
committed by
Jesus Federico
parent
d123d5add0
commit
02b342b157
@ -62,6 +62,16 @@ describe UsersController, type: :controller do
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #signin" do
|
||||
it "redirects to main room if already authenticated" do
|
||||
user = create(:user)
|
||||
@request.session[:user_id] = user.id
|
||||
|
||||
post :signin
|
||||
expect(response).to redirect_to(room_path(user.main_room))
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #edit" do
|
||||
it "renders the edit template" do
|
||||
user = create(:user)
|
||||
|
@ -22,14 +22,14 @@ describe RecordingsHelper do
|
||||
describe "#recording_date" do
|
||||
it "formats the date" do
|
||||
date = DateTime.parse("2019-03-28 19:35:15 UTC")
|
||||
expect(helper.recording_date(date)).to eql("March 28th, 2019.")
|
||||
expect(helper.recording_date(date)).to eql("March 28, 2019")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#recording_length" do
|
||||
it "returns the time if length > 60" do
|
||||
playbacks = [{ type: "test", length: 85 }]
|
||||
expect(helper.recording_length(playbacks)).to eql("1 hrs 25 mins")
|
||||
expect(helper.recording_length(playbacks)).to eql("1 h 25 min")
|
||||
end
|
||||
|
||||
it "returns the time if length == 0" do
|
||||
|
Reference in New Issue
Block a user