improves attachment test to better mimic js client behavior