1. An image forming apparatus that includes an image carrier for carrying a toner image on a surface thereof, an image forming unit for forming the toner image on the image carrier, a transfer unit for transferring the toner image on the image carrier onto a recording medium, and a fixing unit for fixing the toner image on the recording medium, the image forming apparatus comprising: a toner-image detecting unit that detects the toner image on the image carrier, the toner-image detecting unit including a plurality of toner-image detecting sensors aligned and mounted on a first sensor substrate in a main scanning direction; a fixed-image detecting unit that detects the toner image fixed on the recording medium, the fixed-image detecting unit including a plurality of fixed-image detecting sensors aligned and mounted on a second sensor substrate in the main scanning direction; a first image adjusting unit that performs a first operation including: forming a first image adjustment test pattern on the image carrier, causing the toner-image detecting unit to detect the first image adjustment test pattern on the image carrier, controlling the first image adjustment test pattern on the image carrier not to be transferred onto the recording medium, and adjusting a first image forming condition based on a detection value of the first image adjustment test pattern detected by the toner-image detecting unit; and a second image adjusting unit that performs a second operation including: forming a second image adjustment test pattern on the image carrier, and after the toner-image detecting unit detects the second image adjustment test pattern on the image carrier, transferring and fixing the second image adjustment test pattern on a recording medium, or forming a third image adjustment test pattern on the image carrier and transferring and fixing the third image adjustment test pattern formed on the image carrier on a recording medium, causing the fixed-image detecting unit to detect the second or third image adjustment test pattern fixed on the recording medium, and adjusting a second image forming condition based on a detection value of the second or third image adjustment test pattern detected by the toner-image detecting unit and a detection value of the second or third image adjustment test pattern detected by the fixed-image detecting unit, wherein the first sensor substrate of the toner-image detecting unit and the second sensor substrate of the fixed-image detecting unit are arranged so that a position of each of the toner-image detecting sensors in the main scanning direction perpendicular to a conveying direction of the recording medium is aligned with a position of each of the fixed-image detecting sensors, respectively, in the main scanning direction perpendicular to the conveying direction of the recording medium.